Skip to content

Commit

Permalink
chore: update unplugin-config (#3116)
Browse files Browse the repository at this point in the history
  • Loading branch information
kirklin committed Oct 10, 2023
1 parent 71c4394 commit f8698c4
Show file tree
Hide file tree
Showing 3 changed files with 159 additions and 29 deletions.
2 changes: 1 addition & 1 deletion internal/vite-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"rollup-plugin-visualizer": "^5.9.2",
"sass": "^1.63.6",
"unocss": "^0.53.4",
"unplugin-config": "^0.0.13",
"unplugin-config": "^0.1.2",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-dts": "^3.1.0",
"vite-plugin-html": "^3.2.0",
Expand Down
12 changes: 8 additions & 4 deletions internal/vite-config/src/plugins/appConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@ export async function createConfigPluginConfig(
const APP_NAME = strToHex(config?.VITE_GLOB_APP_TITLE ?? '__APP');
// https://github.com/kirklin/unplugin-config
return GenerateConfig({
disabledConfig: !shouldGenerateConfig,
globConfigFileName: GLOBAL_CONFIG_FILE_NAME,
outputDir: OUTPUT_DIR,
appName: APP_NAME,
envConfigPrefix: 'VITE_GLOB_',
envVariables: {
prefix: 'VITE_GLOB_',
},
configFile: {
generate: shouldGenerateConfig,
fileName: GLOBAL_CONFIG_FILE_NAME,
outputDir: OUTPUT_DIR,
},
});
}
Loading

0 comments on commit f8698c4

Please sign in to comment.