k1ngbanana
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
1 deletions
-
internal/vite-config/src/config/application.ts
|
|
|
@ -21,7 +21,10 @@ function defineApplicationConfig(defineOptions: DefineOptions = {}) { |
|
|
|
return defineConfig(async ({ command, mode }) => { |
|
|
|
const root = process.cwd(); |
|
|
|
const isBuild = command === 'build'; |
|
|
|
const { VITE_USE_MOCK, VITE_BUILD_COMPRESS, VITE_ENABLE_ANALYZE } = loadEnv(mode, root); |
|
|
|
const { VITE_PUBLIC_PATH, VITE_USE_MOCK, VITE_BUILD_COMPRESS, VITE_ENABLE_ANALYZE } = loadEnv( |
|
|
|
mode, |
|
|
|
root, |
|
|
|
); |
|
|
|
|
|
|
|
const defineData = await createDefineData(root); |
|
|
|
const plugins = await createPlugins({ |
|
|
|
@ -35,6 +38,7 @@ function defineApplicationConfig(defineOptions: DefineOptions = {}) { |
|
|
|
const pathResolve = (pathname: string) => resolve(root, '.', pathname); |
|
|
|
|
|
|
|
const applicationConfig: UserConfig = { |
|
|
|
base: VITE_PUBLIC_PATH, |
|
|
|
resolve: { |
|
|
|
alias: [ |
|
|
|
{ |
|
|
|
|