forked from crishellco/vue-call-store
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
26 lines (25 loc) · 739 Bytes
/
Copy pathvite.config.js
File metadata and controls
26 lines (25 loc) · 739 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import path from 'path';
import { defineConfig } from 'vite';
import { createVuePlugin } from 'vite-plugin-vue2';
export default defineConfig({
plugins: [createVuePlugin()],
build: {
sourcemap: true,
lib: {
entry: path.resolve(__dirname, 'src/index.js'),
name: 'VueCallStore',
fileName: (format) => `vue-call-store.${format}.js`,
},
minify: false,
rollupOptions: {
// make sure to externalize deps that shouldn't be bundled
// into your library
external: ['vue', 'vuex', 'dayjs'],
output: {
// Provide global variables to use in the UMD build
// for externalized deps
globals: { vue: 'Vue', dayjs: 'dayjs', vuex: 'Vuex' },
},
},
},
});