Skip to content

Commit

Permalink
fix: don't modify the webpack config if the project's on Vue CLI >= 4.5
Browse files Browse the repository at this point in the history
And also fixes the runtime alias, as mentioned at vuejs/devtools#1244 (comment)
  • Loading branch information
sodatea committed Sep 6, 2020
1 parent 6560bba commit bbe310c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion index.js
@@ -1,4 +1,11 @@
module.exports = (api, options) => {
try {
api.assertVersion('< 4.5.0')
} catch (e) {
console.warn(`vue-cli-plugin-vue-next is no longer needed for Vue 3 support, please remove it from the dependencies.`)
return
}

const vueLoaderCacheConfig = api.genCacheConfig('vue-loader', {
'vue-loader': require('vue-loader/package.json').version,
'@vue/compiler-sfc': require('@vue/compiler-sfc/package.json').version
Expand All @@ -10,7 +17,7 @@ module.exports = (api, options) => {
'vue$',
options.runtimeCompiler
? 'vue/dist/vue.esm-bundler.js'
: '@vue/runtime-dom'
: 'vue/dist/vue.runtime.esm-bundler.js'
)

config.module
Expand Down

0 comments on commit bbe310c

Please sign in to comment.