mirror of
https://gitee.com/bootx/dax-pay-ui.git
synced 2025-09-07 04:38:01 +00:00
build 调试构建命令脚本
This commit is contained in:
@@ -25,7 +25,7 @@ async function createPlugins({ isBuild, root, compress, enableAnalyze }: Options
|
||||
const appConfigPlugin = await createAppConfigPlugin({ root, isBuild })
|
||||
vitePlugins.push(appConfigPlugin)
|
||||
|
||||
vitePlugins.push(DevTools())
|
||||
vitePlugins.push(DevTools() as any)
|
||||
|
||||
// vite-plugin-html
|
||||
vitePlugins.push(configHtmlPlugin({ isBuild }))
|
||||
|
@@ -10,11 +10,8 @@ function getConfFiles() {
|
||||
const script = process.env.npm_lifecycle_script as string
|
||||
const reg = new RegExp('--mode ([a-z_\\d]+)')
|
||||
const result = reg.exec(script)
|
||||
if (result) {
|
||||
const mode = result[1]
|
||||
return ['.env', `.env.${mode}`]
|
||||
}
|
||||
return ['.env', '.env.production']
|
||||
const mode = result?.[1]
|
||||
return [`.env.${mode}`]
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user