腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
1
回答
Require
Import
Babel
的
等价物
、
、
我知道当你这样做
的
时候:它等同于:所以我想知道,这相当于:
require
('fancybox'
浏览 12
提问于2017-02-02
得票数 1
回答已采纳
3
回答
在ES6中使用
import
而不是
require
添加模块
、
嗨,我正在尝试添加一个模块到我
的
代码中。在ES5中,我使用了所以我试了试
import
{ promise } from 'bluebird',但它不工作,任何原因?
浏览 4
提问于2016-09-16
得票数 11
回答已采纳
1
回答
强制
Babel
将
import
转换为
require
?
、
在我从节点12升级到节点14之后,巴别塔停止了从
import
到
require
的
转换。这是我
的
Babel
配置: presets: [ useBuiltIns: 'usage',', plugins: [ '@
babel
/plugin-syntax-dynamic-<e
浏览 6
提问于2021-02-08
得票数 1
1
回答
使用
babel
-jest自定义转换器时意外
的
令牌导入
、
、
、
and injects ourmodule.exports =
require
('
babel
-jest').createTransformer({
require
("
babel
-preset-react"),
require
("
babe
浏览 1
提问于2017-08-22
得票数 0
回答已采纳
1
回答
SyntaxError:尝试使用@
babel
/注册器时意外导出令牌
、
、
、
当尝试使用
Babel
和react运行node时,@
babel
/register不起作用 我在SO上看到了类似的问题,重新安装了node 10.15.1,升级到了最新
的
11.9版本。以下是package.json中
的
相关依赖项: "dependencies": { "@
babel
/polyfill": "^7
浏览 50
提问于2019-02-12
得票数 3
3
回答
在webpack.config.
babel
.js中使用“导入”时出错
、
、
、
、
(function (exports,
require
, module, __filename, __dirname) {
import
path from 'path'^^^^^^当我使用webpack-dev-server --hot时会发生此错误。这似乎是因为它看不懂
import
或者webpack不支持
import
。我试着使用
babel
-register,但它不起作用。有办法解决这个问题
浏览 5
提问于2017-04-02
得票数 6
回答已采纳
4
回答
如何为
Babel
启用导入断言?
、
在我
的
React应用程序中,我想使用导入断言:
import
data from "./node_node/
babel
-加载程序/lib/index.js):SyntaxError: E:\src\Clients.js:对实验语法'importAssertions‘
的
支持目前还没有启用。将@
Babel
/plugin-语法-导入-断言()添加到
Babel
配置
的
“plugins”部分,以启用解析。(1
浏览 26
提问于2022-04-30
得票数 3
回答已采纳
1
回答
是否可以在创建-反应-应用服务器端使用react可加载?
、
、
、
我正在遵循他们
的
吉特布页面上
的
指南,因为webpack所需要
的
改变而被困住了。在create-react-app应用程序中,您无法访问webpack,因为它是隐藏
的
。启动服务器时收到
的
错误是: ^^^^^^ SyntaxError: Unexp
浏览 3
提问于2017-11-08
得票数 1
2
回答
运行Node服务器将显示错误消息
、
、
、
webpack刚开始尝试运行我自己
的
服务器(node server.js),但我得到了这样
的
消息:/path/to/server.js:3 at startup (bootstrap_node.js:144:9)My server.js:
require
("
babel
-regis
浏览 2
提问于2016-11-03
得票数 1
1
回答
从
Babel
6转换到
Babel
7时意外
的
令牌导出
、
、
但是当我把我
的
应用程序从
Babel
6转换到
Babel
7时,我会得到这样
的
错误:错误来自于我
的
node_modules中
的
@
babel
/运行时内部,我希望它会被忽略。这是我正在使用
的
使用
babel
寄存器
require
()
的
原始代码:
浏览 1
提问于2018-11-15
得票数 0
2
回答
Webpack班优先
、
、
但我在Chrome中得到一条错误消息: index.js:3未定义ReferenceError:网格未定义
require
('./Grid');我
的
class(Grid.js){ {var webpack =
require
('webpac
浏览 3
提问于2016-08-11
得票数 1
回答已采纳
1
回答
巴贝尔7和预置-2015年不一起工作
、
、
、
、
在之后,我想运行这段代码: ignore: [/(node_modules)/],presets: ['es2015', 'react-app'], 'syntax-dynamic-
import
', 'dynamic-
浏览 2
提问于2018-10-08
得票数 1
回答已采纳
1
回答
尝试使用
babel
-plugin-继电器和Webpack 5运行应用程序时出错
、
、
、
我很难让继电器在我
的
独舞中工作。我已经设置了所有的雅恩工作区(版本浆果)和Webpack 5。当我试图运行我
的
一个应用程序时,我会发现一个错误: Critical dependency: the request of a dependency is
浏览 20
提问于2022-04-14
得票数 0
回答已采纳
2
回答
我应该使用什么
babel
插件来正确地工作react-dnd?
、
、
、
我想在我
的
项目中使用react-dnd。://localhost:1212/dist/renderer.dev.js:29536:18) 在编译后
的
代码中,我看到了: (function (exports,
require
, module,, module, __filename, __dirname); }); 我知道这是一个巴别塔
的
问题,但我不确定我应该使用什么插件来解决我
的
问题。'),
require
(
浏览 25
提问于2019-08-29
得票数 0
1
回答
"
babel
“对于react jsx是只读
的
、
我将
babel
导入到我
的
jsx文件中,如下所示。但我得到模块构建失败
的
错误: SyntaxError:"
babel
“是只读
的
import
{ transform } from '
babel
-core';
import
* as
babel
from '
浏览 0
提问于2017-01-25
得票数 0
1
回答
如何使
babel
/注册表对导入
的
文件产生影响?
、
、
、
require
('@
babel
/register'); console.log('No;}); 如果要包含同样包含
import
或export关键字
的
文件(本例中为export),则会出现错误SyntaxError: Unexpected token export。
requir
浏览 2
提问于2018-11-06
得票数 0
回答已采纳
1
回答
对模块导出/要求感到困惑
、
、
、
、
我
的
索引是:const fs =
require
('fs');const'.gif', '.jpeg', '.jpg', '.png', '.svg'];
require
('@
babel
浏览 3
提问于2021-01-25
得票数 0
1
回答
我
的
vue应用程序抛出错误“`Object不支持IE中
的
属性或方法”包含‘
、
、
、
、
我有这个问题 我试图在vender.js中添加类似的内容 String.prototype.contains = function (str, startIndex) { };但它仍然不起作用。原因是什么?
浏览 3
提问于2018-09-12
得票数 0
回答已采纳
1
回答
巴别塔7相当于巴别塔-寄存器?
、
、
、
、
我遵循
的
教程为我提供了在构建过程中运行以下命令:这是有道理
的
,然而,我所遵循
的
教程在示例中使用了
Babel
6。我已经使用@
babel
/core和@
babel
/preset-env而不是
babel
-core和
babel
-preset-env将我
浏览 5
提问于2019-01-09
得票数 0
2
回答
如何配置世博以允许全球模块导入?
、
我在找一种方法来摆脱这些老实说,我尝试了很多技巧: 导入{ get_records }从‘@app/存储/操作/异步’; 从‘main
浏览 0
提问于2018-04-27
得票数 1
回答已采纳
点击加载更多
相关
资讯
还在用 require?是时候拥抱 import 了!
探索 babel和babel 插件是怎么工作的
简单10步,徙手搭建React开发环境
理解 Python 中的 import
你知道include与require的区别吗?
热门
标签
更多标签
云服务器
ICP备案
对象存储
云点播
实时音视频
活动推荐
运营活动
广告
关闭
领券