我刚刚将 vue-cli 从 v3 升级到 v4。开发模式有效!但是构建过程错误:
error in ./src/App/components/AppLayout.vue?vue&type=script&lang=js&
Module build failed (from ./node_modules/thread-loader/dist/cjs.js):
Thread Loader (Worker 0)
Cannot read property 'options' of undefined
at PoolWorker.fromErrorObj (/home/vsonline/workspace/node_modules/thread-loader/dist/WorkerPool.js:26
2:12)
at /home/vsonline/workspace/node_modules/thread-loader/dist/WorkerPool.js:204:29
at mapSeries (/home/vsonline/workspace/node_modules/neo-async/async.js:3625:14)
at PoolWorker.onWorkerMessage (/home/vsonline/workspace/node_modules/thread-loader/dist/WorkerPool.js
:170:35)
at /home/vsonline/workspace/node_modules/thread-loader/dist/WorkerPool.js:152:14
at Socket.onChunk (/home/vsonline/workspace/node_modules/thread-loader/dist/readBuffer.js:36:9)
at Object.loader (/home/vsonline/workspace/node_modules/vue-inheritance-loader/src/index.js:26:32)
@ ./src/App/components/AppLayout.vue?vue&type=script&lang=js& 1:0-458 1:474-477 1:479-934 1:479-934
@ ./src/App/components/AppLayout.vue
@ ./src/App/router/index.js
@ ./src/main.ts
@ multi ./src/main.ts
vue.config.js: parallel: false 对我有用。