npm run build 报错问题
程序员文章站
2022-05-30 09:19:49
...
ERROR in static/js/app.c75e3183ee8f2216d466.js from UglifyJs
Unexpected token: operator (>) [./unfetch/unfetch.js:14,0][static/js/app.c75e3183ee8f2216d466.js:901,41]
修改webpack的配置
{
test: /\.js$/,
loader: 'babel-loader',
options: {
presets: ['es2015']
},
include: [resolve('src'), resolve('test')]
}
将你报错的东西添加到里面去,如下
{
test: /\.js$/,
loader: 'babel-loader',
options: {
presets: ['es2015']
},
include: [resolve('src'), resolve('test'), resolve('unfetch')]
}
推荐阅读
-
关于vue的npm run dev和npm run build的区别介绍
-
基于vue-cli npm run build之后vendor.js文件过大的解决方法
-
vue中Npm run build 根据环境传递参数方法来打包不同域名
-
ubuntu vps安装docker报错:Cannot connect to the Docker daemon at unix:///var/run/docker.sock.问题解决
-
Vue -- vue-cli(vue脚手架) npm run build打包优化
-
vue 动态设置img的src地址无效,npm run build 后找不到文件的解决
-
关于VSTS自动Build报错问题之Microsoft.Net.Compilers
-
关于vue的npm run dev和npm run build的区别介绍
-
npm run dev 报错 ERROR in Entry module not found: Error: Can't resolve './src' in
-
vue打包npm run build时候界面报错的解决