1
0
mirror of https://github.com/mathuo/dockview synced 2025-03-10 07:52:07 +00:00
dockview/packages/dockview-vue/vite.config.ts

34 lines
1.0 KiB
TypeScript
Raw Permalink Normal View History

2024-03-04 20:28:25 +00:00
import { defineConfig } from 'vite';
import { resolve } from 'path';
import vue from '@vitejs/plugin-vue';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
2024-05-09 20:04:45 +00:00
2024-03-04 20:28:25 +00:00
build: {
2024-04-24 19:08:43 +00:00
minify: false,
2024-03-04 20:28:25 +00:00
lib: {
// src/indext.ts is where we have exported the component(s)
entry: resolve(__dirname, 'src/index.ts'),
name: 'dockview-vue',
// the name of the output files when the build is run
fileName: (format) => `dockview-vue.${format}.js`,
2024-05-09 20:04:45 +00:00
formats: ['es', 'umd', 'cjs'],
2024-03-04 20:28:25 +00:00
},
rollupOptions: {
// make sure to externalize deps that shouldn't be bundled
// into your library
external: ['vue', 'dockview-core'],
output: {
// Provide global variables to use in the UMD build
// for externalized deps
globals: {
vue: 'Vue',
['dockview-core']: 'DockviewCore',
},
},
},
},
});