Answer the question
In order to leave comments, you need to log in
Vue-hackernews: Module build failed: SyntaxError: Unexpected token?
macOS. Trying to run https://github.com/vuejs/vue-hackernews-2.0 (example for vue-server-renderer).
NodeJs version:
node -v
v10.14.1
npm -v
6.4.1
npm install
npm run dev
./src/router/index.js
Module build failed: SyntaxError: Unexpected token (7:35)
5 |
6 | // route-level code splitting
> 7 | const createListView = id => () => import('../views/CreateListView').then(m => m.default(id))
| ^
8 | const ItemView = () => import('../views/ItemView.vue')
9 | const UserView = () => import('../views/UserView.vue')
10 |
BabelLoaderError: SyntaxError: Unexpected token (7:35)
Answer the question
In order to leave comments, you need to log in
Check if .babelrc has this:
"plugins": [
"syntax-dynamic-import"
]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question