I've a vue application with js/ts mix.
After running command vue-cli-service build the compiled (prod-)code in browser (Chrome) returns multiple errors with rare messages by runtime-core.esm-bundler.js:226:
SyntaxError: 30 (at compiler-core.esm-bundler.js:12:17)
at bl (compiler-core.esm-bundler.js:12:17)
at Nd (compiler-core.esm-bundler.js:3404:11)
at Array.<anonymous> (compiler-core.esm-bundler.js:3603:44)
at H_ (compiler-core.esm-bundler.js:2014:13)
at F_ (compiler-core.esm-bundler.js:1966:5)
at H_ (compiler-core.esm-bundler.js:2008:7)
at F_ (compiler-core.esm-bundler.js:1966:5)
at H_ (compiler-core.esm-bundler.js:2008:7)
at z_ (compiler-core.esm-bundler.js:1900:3)
at uh (compiler-core.esm-bundler.js:4678:3)
...
All requests are working, but the page keeps blank.
At the develop environment anything works without errors.
Here the package.json:
// package.json
{
"name": "vue-running-with-webpack",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"docs": "jsdoc -d docs -c -r src --verbose",
"test:unit": "vue-cli-service test:unit test/unit/**/*.spec.js"
},
"devDependencies": {
"@babel/core": "^7.12.16",
"@babel/eslint-parser": "^7.12.16",
"@typescript-eslint/parser": "^6.10.0",
"@ui5/webcomponents": "^1.17.0",
"@ui5/webcomponents-fiori": "^1.19.0",
"@ui5/webcomponents-icons": "^1.19.0",
"@ui5/webcomponents-icons-business-suite": "^1.17.2",
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-plugin-typescript": "^5.0.8",
"@vue/cli-plugin-unit-mocha": "^5.0.8",
"@vue/cli-service": "~5.0.0",
"@vue/compiler-sfc": "^3.3.4",
"@vue/test-utils": "^2.4.1",
"chai": "^4.3.10",
"core-js": "^3.8.3",
"eslint": "^7.32.0",
"eslint-plugin-vue": "^8.7.1",
"html-loader": "^4.2.0",
"jsdoc": "^4.0.2",
"jsdoc-vuejs": "^4.0.0",
"odata": "^2.0.0",
"sass": "^1.67.0",
"sass-loader": "^13.3.2",
"vue": "^3.2.13",
"vue-i18n": "^9.5.0",
"vue-router": "^4.2.4",
"vuex": "^4.0.2"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead",
"not ie 11"
]
}
Questions:
- How to debug the SyntaxError? (the message is not very usefull)
- Is the mix js/ts a problem?