Skip to content

Commit

Permalink
fix: force resolution of vue to deal with deps requiring vue
Browse files Browse the repository at this point in the history
fix #16
  • Loading branch information
yyx990803 committed Jul 1, 2022
1 parent 2d24d2a commit 9a78726
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/index.ts
Expand Up @@ -90,6 +90,12 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin {
cssDevSourcemap: config.css?.devSourcemap ?? false,
devToolsEnabled: !config.isProduction
}
if (!config.resolve.alias.some(({ find }) => find === 'vue')) {
config.resolve.alias.push({
find: 'vue',
replacement: 'vue/dist/vue.runtime.esm.js'
})
}
},

configureServer(server) {
Expand Down

0 comments on commit 9a78726

Please sign in to comment.