feat: support some configurations through the .env file
This commit is contained in:
@@ -31,7 +31,7 @@ function defineApplicationConfig(options: DefineApplicationOptions = {}) {
|
||||
pwa: true,
|
||||
turboConsole: false,
|
||||
...(typeof application === 'function'
|
||||
? application(config)
|
||||
? await application(config)
|
||||
: application),
|
||||
});
|
||||
|
||||
@@ -71,7 +71,7 @@ function defineApplicationConfig(options: DefineApplicationOptions = {}) {
|
||||
);
|
||||
return mergeConfig(
|
||||
mergedConfig,
|
||||
typeof vite === 'function' ? vite(config) : vite,
|
||||
typeof vite === 'function' ? await vite(config) : vite,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
@@ -22,7 +22,7 @@ function defineLibraryConfig(options: DefineLibraryOptions = {}) {
|
||||
injectMetadata: true,
|
||||
isBuild,
|
||||
mode,
|
||||
...(typeof library === 'function' ? library(config) : library),
|
||||
...(typeof library === 'function' ? await library(config) : library),
|
||||
});
|
||||
|
||||
const { dependencies = {}, peerDependencies = {} } =
|
||||
@@ -54,7 +54,7 @@ function defineLibraryConfig(options: DefineLibraryOptions = {}) {
|
||||
const mergedConfig = mergeConfig(commonConfig, packageConfig);
|
||||
return mergeConfig(
|
||||
mergedConfig,
|
||||
typeof vite === 'function' ? vite(config) : vite,
|
||||
typeof vite === 'function' ? await vite(config) : vite,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user