24 lines
503 B
TypeScript
24 lines
503 B
TypeScript
|
|
import { defineConfig } from 'vite'
|
||
|
|
import vue from '@vitejs/plugin-vue'
|
||
|
|
import path from 'node:path'
|
||
|
|
|
||
|
|
export default defineConfig({
|
||
|
|
plugins: [vue()],
|
||
|
|
build: {
|
||
|
|
lib: {
|
||
|
|
entry: path.resolve(__dirname, 'index.ts'),
|
||
|
|
name: 'MosquitoVueEnhanced',
|
||
|
|
formats: ['es', 'cjs'],
|
||
|
|
fileName: (format) => (format === 'es' ? 'index.js' : 'index.cjs')
|
||
|
|
},
|
||
|
|
rollupOptions: {
|
||
|
|
external: ['vue'],
|
||
|
|
output: {
|
||
|
|
globals: {
|
||
|
|
vue: 'Vue'
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
})
|