搜了下资料说删除vue-cli中.babelrc下的一个配置可以引用其他标准的模块包
现在有个拼音库想打包,就试了下
{
"presets": [
["env", {
"modules": false, //删除这行
"targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
}
}],
"stage-2"
],
"plugins": ["transform-runtime"],
"env": {
"test": {
"presets": ["env", "stage-2"],
"plugins": ["istanbul"]
}
}
}
可是并不可行,整个项目都报错
133:3 Uncaught ReferenceError: exports is not defined
at eval (133:3)
at Object.<anonymous> (app.js:1644)
at __webpack_require__ (app.js:689)
at fn (app.js:110)
at Object.<anonymous> (app.js:2886)
at __webpack_require__ (app.js:689)
at app.js:790
at app.js:793
有什么解决方法吗?
BIG阳
相关分类