mirror of
https://github.com/antd-tiny-vue/antd-tiny-vue.git
synced 2024-11-10 09:39:15 +08:00
47 lines
1.0 KiB
TypeScript
47 lines
1.0 KiB
TypeScript
|
import { defineConfig } from 'vite'
|
||
|
import vueJsx from '@vitejs/plugin-vue-jsx'
|
||
|
import dts from 'vite-plugin-dts'
|
||
|
export default defineConfig({
|
||
|
plugins: [
|
||
|
vueJsx(),
|
||
|
dts({
|
||
|
outputDir: ['es', 'lib'],
|
||
|
include: ['components/**/*.ts', 'components/**/*.tsx']
|
||
|
})
|
||
|
],
|
||
|
build: {
|
||
|
rollupOptions: {
|
||
|
external: [
|
||
|
'@ant-design/colors',
|
||
|
/^@ant-design\/icons-vue/,
|
||
|
'@antd-tiny-vue/cssinjs',
|
||
|
'@ctrl/tinycolor',
|
||
|
'@v-c/utils',
|
||
|
'@vueuse/core',
|
||
|
'vue'
|
||
|
],
|
||
|
output: [
|
||
|
{
|
||
|
format: 'es',
|
||
|
dir: 'es',
|
||
|
entryFileNames: '[name].js',
|
||
|
preserveModules: true,
|
||
|
preserveModulesRoot: 'components'
|
||
|
},
|
||
|
{
|
||
|
format: 'cjs',
|
||
|
dir: 'lib',
|
||
|
entryFileNames: '[name].js',
|
||
|
preserveModules: true,
|
||
|
preserveModulesRoot: 'components',
|
||
|
exports: 'named'
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
lib: {
|
||
|
entry: 'components/index.ts',
|
||
|
formats: ['es', 'cjs']
|
||
|
}
|
||
|
}
|
||
|
})
|