mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-03-22 11:58:59 +08:00
使用vite(rolldown)替代unbuild
This commit is contained in:
@@ -11,8 +11,8 @@
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "pnpm unbuild",
|
||||
"stub": "pnpm unbuild --stub"
|
||||
"build": "pnpm vite build",
|
||||
"stub": "unbuild --stub"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
@@ -96,6 +96,7 @@
|
||||
"@types/lodash.get": "catalog:",
|
||||
"@types/lodash.isequal": "catalog:",
|
||||
"@types/lodash.set": "catalog:",
|
||||
"@types/nprogress": "catalog:"
|
||||
"@types/nprogress": "catalog:",
|
||||
"vite-plugin-dts": "catalog:"
|
||||
}
|
||||
}
|
||||
|
||||
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