chore: 框架构建流程调整

This commit is contained in:
wangxuefeng
2025-03-11 15:03:57 +08:00
parent 9438489a11
commit b0f2b93bbf
42 changed files with 2075 additions and 1128 deletions

View File

@@ -7,13 +7,16 @@ import mkcert from 'vite-plugin-mkcert';
// @ts-ignore
export default defineConfig(({ mode }) => {
console.log('mode', mode);
const env = loadEnv(mode, process.cwd(), ['VITE_', 'Y_CODE_']);
const env = loadEnv(mode, process.cwd(), ['VITE_']);
const isDev = env.VITE_NODE_ENV === 'development';
return {
server: {
port: Number(env.VITE_PORT),
cors: true,
},
server: isDev
? {
port: Number(env.VITE_PORT),
cors: true,
}
: undefined,
// @ts-ignore coding
vitePlugins: [vue(), mkcert({ source: 'coding' })],
compilation: {