mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-04-09 12:33:14 +08:00
使用vite(rolldown)替代unbuild
This commit is contained in:
23
packages/@core/base/shared/vite.config.ts
Normal file
23
packages/@core/base/shared/vite.config.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
import { defineConfig } from 'vite';
|
||||
import dts from 'vite-plugin-dts';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [vue(), dts({ logLevel: 'error' })],
|
||||
build: {
|
||||
emptyOutDir: true,
|
||||
lib: {
|
||||
entry: {
|
||||
store: 'src/store.ts',
|
||||
'constants/index': 'src/constants/index.ts',
|
||||
'utils/index': 'src/utils/index.ts',
|
||||
'color/index': 'src/color/index.ts',
|
||||
'cache/index': 'src/cache/index.ts',
|
||||
'global-state': 'src/global-state.ts',
|
||||
},
|
||||
// 按原始文件名输出
|
||||
fileName: (format, entryName) => `${entryName}.mjs`,
|
||||
formats: ['es'],
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user