-
Notifications
You must be signed in to change notification settings - Fork 918
Closed
Labels
Description
Version
16.0.0-beta.6
Steps to reproduce
node_modules/@vue/cli-service/node_modules/vue-loader-v16
ERROR Failed to compile with 1 errors
error in ./src/App.vue?vue&type=script&lang=js
Module build failed (from ./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js):
TypeError: Cannot read property 'content' of undefined
at Object.selectBlock (/Users/hekai/Workspace/baidu/hairuo-uploader/demo/node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/select.js:24:45)
at Object.loader (/Users/hekai/Workspace/baidu/hairuo-uploader/demo/node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js:59:25)
@ ./src/App.vue?vue&type=script&lang=js 1:0-292 1:0-292 1:293-574 1:293-574
@ ./src/App.vue
@ ./src/main.js
@ multi ./src/main.js
I found that selectBlock
is invoked while descriptor.scriptCompiled
have not been assigned. No more idea about the issue.
Lines 105 to 108 in f19f2b3
if (incomingQuery.type) { | |
return selectBlock( | |
descriptor, | |
loaderContext, |
Line 134 in f19f2b3
script = (descriptor as any).scriptCompiled = compileScript(descriptor, { |
Lines 25 to 29 in f19f2b3
const script = (descriptor as any).scriptCompiled | |
if (appendExtension) { | |
loaderContext.resourcePath += '.' + (script.lang || 'js') | |
} | |
loaderContext.callback(null, script.content, script.map) |
What is expected?
Build success
What is actually happening?
Build failed