32 lines
657 B
TypeScript
32 lines
657 B
TypeScript
import {
|
|
defineConfig
|
|
} from 'vite';
|
|
import dts from 'vite-plugin-dts';
|
|
import {
|
|
resolve
|
|
} from 'node:path';
|
|
import vue from '@vitejs/plugin-vue';
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig( {
|
|
'plugins': [
|
|
vue(),
|
|
dts()
|
|
],
|
|
'build': {
|
|
'lib': {
|
|
'entry': resolve( __dirname, 'src/index.ts' ),
|
|
'name': 'TestComponent',
|
|
'fileName': 'test-component',
|
|
},
|
|
'rollupOptions': {
|
|
'external': [ 'vue' ],
|
|
'output': {
|
|
'globals': {
|
|
'vue': 'Vue',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
} );
|