dataease-dm/core/core-frontend/vite.config.ts

23 lines
622 B
Java
Raw Normal View History

2023-10-23 22:00:14 +08:00
import common from './config/common';
import base from './config/base';
import distributed from './config/distributed';
2023-10-23 22:00:14 +08:00
import dev from './config/dev';
import lib from './config/lib';
import pages from './config/pages';
import { defineConfig, mergeConfig } from 'vite'
export default defineConfig(({mode}) => {
if (mode === 'dev') {
return mergeConfig(common , mergeConfig(dev, pages))
2023-10-23 22:00:14 +08:00
}
if (mode === 'lib') {
return mergeConfig(common , lib)
}
if (mode === 'distributed') {
return mergeConfig(common, mergeConfig(distributed, pages))
}
2023-10-23 22:00:14 +08:00
return mergeConfig(common, mergeConfig(base, pages))
})