in vue-cli project. I'm run 'npm run build' . I put the code in a new Serve . Open in some browsers of Mobile phone and embedded app give me the error.
Even in 'npm run dev ', I have the trubble too.
01-18 19:22:05.863 10566-10566/com.lashou.cloud I/chromium: [INFO:CONSOLE(1)] "Uncaught SyntaxError: Use of const in strict mode.", source: http://xxxx.com/scence-page/static/js/vendor.7dcd0bb04c3e2536f299.js
(1)
01-18 19:22:05.918 10566-10566/com.lashou.cloud I/chromium: [INFO:CONSOLE(1)] "Uncaught TypeError: Cannot read property 'call' of undefined", source: http://xxxx.com/scence-page/static/js/manifest.436380d0d3d35747451c.js
(1)
node : v8.9.3
in package.json
"vue": "^2.5.2",
"babel-core": "^6.22.1",
"webpack-dev-server": "^2.7.1",
"webpack-merge": "^4.1.0"
"babel-core": "^6.22.1",
"babel-eslint": "^7.1.1",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-jest": "^21.0.2",
"babel-loader": "^7.1.1",
"babel-plugin-dynamic-import-node": "^1.2.0",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.0",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-plugin-transform-vue-jsx": "^3.5.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.3.2",
"babel-preset-stage-2": "^6.22.0",
"babel-register": "^6.22.0",
"babel-runtime": "^6.26.0",
in webpack.base.conf.js
entry: {
app: ['babel-polyfill', './src/main.js']
},
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client/index.js')]
},
]
},
You appearantly use some npm package that was
written with ES6 JavaScript and has not been transpiled to ES5 with Babel.
If you can find out which it is, you can add it's path to babel-loader's include option.
Thank you. I found a file that was not compiled. The problem has been solved
@happy760690 I faced the same issue and solved it.
Most helpful comment
You appearantly use some npm package that was
written with ES6 JavaScript and has not been transpiled to ES5 with Babel.
If you can find out which it is, you can add it's path to babel-loader's include option.