You may need an additional loader to handle the result of these loaders.
|
| async created() {
> if (this.$route.params?.page) {
| this.onChangePage(this.$route.params.page);
| }
Если убрать вопросительный знак то все стартует нормально, не могу понять в чем причина. Вопросительный знак там необходим, т.к. параметров может и не быть.
{
"name": "first-project",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"test": "jest"
},
"jest": {
"moduleFileExtensions": [
"js",
"vue"
],
"transform": {
".*\\.(vue)$": "<rootDir>/node_modules/vue-jest",
"^.+\\.js$": "<rootDir>/node_modules/babel-jest"
},
"collectCoverage": true,
"collectCoverageFrom": [
"**/*.{js,vue}",
"!**/node_modules/**",
"!coverage/**"
]
},
"dependencies": {
"core-js": "^3.6.5",
"vue": "^2.6.11",
"vue-router": "^3.5.2",
"vuex": "^3.6.2"
},
"devDependencies": {
"@babel/core": "^7.14.3",
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/test-utils": "1.2.0",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "^10.1.0",
"babel-jest": "26.6.3",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2",
"jest": "26.6.3",
"node-sass": "^6.0.1",
"sass": "^1.26.5",
"sass-loader": "^8.0.2",
"vue-jest": "^3.0.7",
"vue-template-compiler": "^2.6.11"
}
}