Bug report(问题描述)
Mac OSX 上,可以 run dev,但是执行 build:prod 时报错
ERROR Failed to compile with 1 errors 下午11:02:51
error in ./src/router/index.js
Module parse failed: Unexpected token (48:13)
You may need an appropriate loader to handle this file type.
| path: '/redirect/:path(.*)',
| component: function component() {
> return import('@/views/redirect/index');
| }
| }]
@ ./src/main.js 21:0-30 59:10-16
@ multi ./src/main.js
ERROR Build failed with errors.
Steps to reproduce(问题复现步骤)
Screenshot or Gif(截图或动态图)
Link to minimal reproduction(最小可在线还原demo)
Other relevant information(格外信息)
- Your OS: MacOS Catalina 10.15.5
- Node.js version: v12.5.0
- vue-element-admin version: 4.4.0
1条答案
按热度按时间u4dcyp6a1#
执行 npm install webpack 后,可以打包成功