Vue router - cannot lazy load component - Unexpected Token
Your webpack is not configured the spec! Só there are two ways to solve your problem!
The first one is to change all occurence of import('path/to/component.vue')
to System.import('path/to/component.vue')
And the second is using BABEL with the folowing configuration
.babelrc
{
"presets": [
["es2015", { "modules": false }],
"stage-2"
],
"plugins": [
"transform-export-extensions"
]
}
Resources
ES6 Modules
Dynamic Import
Stage-2 Babel Preset