Skip to content

Commit 83cbaf0

Browse files
committed
chore: externalize deps
1 parent 17da6aa commit 83cbaf0

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

vite.config.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,29 @@ export default defineConfig({
1111
formats: ['es', 'umd', 'iife'],
1212
},
1313
rollupOptions: {
14+
// make sure to externalize deps that shouldn't be bundled
15+
// into your library
16+
external: [
17+
'vue',
18+
'vuex',
19+
'vue-router',
20+
'axios',
21+
'pinia',
22+
'lodash',
23+
'secure-ls',
24+
'jwt-decode',
25+
'js-cookie',
26+
],
27+
output: {
28+
// Provide global variables to use in the UMD build
29+
// for externalized deps
30+
globals: {
31+
vue: 'Vue',
32+
},
33+
},
34+
resolve: {
35+
dedupe: ['vue', 'vue-router'],
36+
},
1437
plugins: [
1538
{
1639
name: 'remove-collection-handlers',

0 commit comments

Comments
 (0)