[英]“babel” is read-only with react jsx
我将babel导入到我的jsx文件中,如下所示。 但是我收到模块构建失败的错误消息:SyntaxError:“ babel”是只读的
var babel = require("babel-core");
import { transform } from 'babel-core';
import * as babel from 'babel-core';
我猜这是因为您使用相同的变量名称babel 。
var babel = require("babel-core");
import * as babel from 'babel-core';
使用其他名称,然后重试。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.