Skip to content
Discussion options

You must be logged in to vote

After some additional research, this is due to vue-loader trying to use require('vue/compiler-sfc') insteads of require('@vue/compiler-sfc') which is required directly in the template. https://github.com/vuejs/vue-loader/blob/6a293dff5f2ed3167eb3b448f1d714091185a44e/src/compiler.ts#L12-L25

This can be solved by adding the following:

npm uninstall "@vue/compiler-sfc"
npm install -D "vue"

Example: nova-issues/issue-4595@e56d8af

There could be side-effect on requiring vue directly (the generated dist are slightly larger with more code) but I can't find any error at the moment. Best to first try with npm run dev and tests it out before using npm run prod.

Replies: 2 comments

This comment has been hidden.

Comment options

You must be logged in to vote
0 replies
Answer selected by crynobone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #4677 on August 10, 2022 01:35.