Commit f3f56288af697baa139f8f17cf8e6358289b9e72
1 parent
473e56e4
fix: build error
Showing
1 changed file
with
3 additions
and
8 deletions
build/script/buildConf.ts
@@ -16,13 +16,8 @@ interface CreateConfigParams { | @@ -16,13 +16,8 @@ interface CreateConfigParams { | ||
16 | configFileName?: string; | 16 | configFileName?: string; |
17 | } | 17 | } |
18 | 18 | ||
19 | -function createConfig( | ||
20 | - { configName, config, configFileName }: CreateConfigParams = { | ||
21 | - configName: '', | ||
22 | - config: {}, | ||
23 | - configFileName: GLOB_CONFIG_FILE_NAME, | ||
24 | - }, | ||
25 | -) { | 19 | +function createConfig(params: CreateConfigParams) { |
20 | + const { configName, config, configFileName } = params; | ||
26 | try { | 21 | try { |
27 | const windowConf = `window.${configName}`; | 22 | const windowConf = `window.${configName}`; |
28 | // Ensure that the variable will not be modified | 23 | // Ensure that the variable will not be modified |
@@ -46,5 +41,5 @@ function createConfig( | @@ -46,5 +41,5 @@ function createConfig( | ||
46 | export function runBuildConfig() { | 41 | export function runBuildConfig() { |
47 | const config = getEnvConfig(); | 42 | const config = getEnvConfig(); |
48 | const configFileName = getConfigFileName(config); | 43 | const configFileName = getConfigFileName(config); |
49 | - createConfig({ config, configName: configFileName }); | 44 | + createConfig({ config, configName: configFileName, configFileName: GLOB_CONFIG_FILE_NAME }); |
50 | } | 45 | } |