mirror of
https://github.com/javaLuo/vue-flip-down.git
synced 2025-04-05 03:05:03 +08:00
28 lines
683 B
TypeScript
28 lines
683 B
TypeScript
import {resolve} from 'path'
|
|
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import dts from 'vite-plugin-dts';
|
|
import libCss from 'vite-plugin-libcss';
|
|
|
|
// https://vitejs.dev/config/
|
|
module.exports = defineConfig({
|
|
plugins: [vue(), dts({insertTypesEntry: true, copyDtsFiles: false}), libCss()],
|
|
resolve: { dedupe: ['vue'] },
|
|
build: {
|
|
lib: {
|
|
name: 'vue-flip-down',
|
|
entry: resolve(__dirname, 'src/lib/main.ts'),
|
|
fileName: (format) => `vue-flip-down.${format}.js`
|
|
},
|
|
cssCodeSplit: true,
|
|
|
|
rollupOptions: {
|
|
external: ['vue'],
|
|
output: {
|
|
globals: {
|
|
vue: 'Vue'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}) |