Skip to content

Commit bbe310c

Browse files
committed
fix: don't modify the webpack config if the project's on Vue CLI >= 4.5
And also fixes the runtime alias, as mentioned at vuejs/devtools-v6#1244 (comment)
1 parent 6560bba commit bbe310c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

index.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
module.exports = (api, options) => {
2+
try {
3+
api.assertVersion('< 4.5.0')
4+
} catch (e) {
5+
console.warn(`vue-cli-plugin-vue-next is no longer needed for Vue 3 support, please remove it from the dependencies.`)
6+
return
7+
}
8+
29
const vueLoaderCacheConfig = api.genCacheConfig('vue-loader', {
310
'vue-loader': require('vue-loader/package.json').version,
411
'@vue/compiler-sfc': require('@vue/compiler-sfc/package.json').version
@@ -10,7 +17,7 @@ module.exports = (api, options) => {
1017
'vue$',
1118
options.runtimeCompiler
1219
? 'vue/dist/vue.esm-bundler.js'
13-
: '@vue/runtime-dom'
20+
: 'vue/dist/vue.runtime.esm-bundler.js'
1421
)
1522

1623
config.module

0 commit comments

Comments
 (0)