Skip to content

Commit 601564c

Browse files
committed
build: update vite config
1 parent 332524a commit 601564c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

vite.config.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,24 @@ import { defineConfig } from 'vite'
44
import vue from '@vitejs/plugin-vue'
55

66
export default defineConfig({
7-
plugins: [vue()],
7+
plugins: [
8+
vue({ isProduction: true })
9+
],
810
build: {
911
cssCodeSplit: true,
1012
emptyOutDir: true,
1113
lib: {
1214
entry: path.resolve(__dirname, 'src'),
1315
name: 'VueAnnouncer',
14-
formats: ['es', 'umd', 'iife']
16+
formats: ['es', 'cjs', 'iife']
1517
},
1618
rollupOptions: {
17-
external: ['vue'],
19+
external: ['vue', 'vue-router'],
1820
output: {
1921
exports: 'named',
2022
globals: {
21-
vue: 'Vue'
23+
vue: 'Vue',
24+
'vue-router': 'vueRouter'
2225
}
2326
}
2427
}

0 commit comments

Comments
 (0)