如何在webpack.config里面支持babel es6插件
6 回答

拉风的咖菲猫
TA贡献1995条经验 获得超2个赞
先:
$ npm install babel-plugin-transform-es2015-typeof-symbol
配置 .babelrc 文件:
{
"plugins": ["transform-es2015-typeof-symbol"]
}
bebel 会自动获取这个文件,然后使用插件。

白衣染霜花
TA贡献1796条经验 获得超10个赞
npm i babel-loader
module: {
loaders: [
{
test: /\.(jsx|es6)$/,
loader: "babel-loader"
}
]
}

杨__羊羊
TA贡献1943条经验 获得超7个赞
先:
$ npm install babel-plugin-transform-es2015-typeof-symbol
配置 .babelrc 文件:
{
"plugins": ["transform-es2015-typeof-symbol"]
}
bebel 会自动获取这个文件,然后使用插件。
添加回答
举报
0/150
提交
取消