29 行
641 B
TypeScript
29 行
641 B
TypeScript
|
|
import { defineConfig } from 'vite'
|
||
|
|
import vue from '@vitejs/plugin-vue'
|
||
|
|
import dts from 'vite-plugin-dts'
|
||
|
|
import { resolve } from 'path'
|
||
|
|
|
||
|
|
export default defineConfig({
|
||
|
|
plugins: [
|
||
|
|
vue(),
|
||
|
|
dts({ include: ['src/**/*.ts', 'src/**/*.vue'], rollupTypes: true }),
|
||
|
|
],
|
||
|
|
build: {
|
||
|
|
lib: {
|
||
|
|
entry: resolve(__dirname, 'src/index.ts'),
|
||
|
|
name: 'XuqmVue3SDK',
|
||
|
|
formats: ['es', 'cjs'],
|
||
|
|
fileName: (format) => `index.${format}.js`,
|
||
|
|
},
|
||
|
|
rollupOptions: {
|
||
|
|
external: ['vue'],
|
||
|
|
output: {
|
||
|
|
globals: { vue: 'Vue' },
|
||
|
|
},
|
||
|
|
},
|
||
|
|
},
|
||
|
|
resolve: {
|
||
|
|
alias: { '@': resolve(__dirname, 'src') },
|
||
|
|
},
|
||
|
|
})
|