File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed
Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @callstack/repack " : patch
3+ ---
4+
5+ Set NODE_ENV based on args.dev option
Original file line number Diff line number Diff line change 11import {
22 ASSETS_DEST_ENV_KEY ,
33 BUNDLE_FILENAME_ENV_KEY ,
4+ NODE_ENV_KEY ,
45 RSPACK_RAYON_THREADS_ENV_KEY ,
56 RSPACK_TOKIO_THREADS_ENV_KEY ,
67 SOURCEMAP_FILENAME_ENV_KEY ,
@@ -17,10 +18,12 @@ interface EnvironmentArgs {
1718 assetsDest ?: string ;
1819 bundleOutput ?: string ;
1920 sourcemapOutput ?: string ;
21+ dev ?: boolean ;
2022 verbose ?: boolean ;
2123}
2224
2325export function setupEnvironment ( args : EnvironmentArgs ) : void {
26+ setEnvVar ( NODE_ENV_KEY , args . dev === false ? 'production' : 'development' ) ;
2427 setEnvVar ( VERBOSE_ENV_KEY , args . verbose ? 'true' : undefined ) ;
2528 setEnvVar ( BUNDLE_FILENAME_ENV_KEY , args . bundleOutput ) ;
2629 setEnvVar ( SOURCEMAP_FILENAME_ENV_KEY , args . sourcemapOutput ) ;
Original file line number Diff line number Diff line change 1+ export const NODE_ENV_KEY = 'NODE_ENV' ;
12export const VERBOSE_ENV_KEY = 'REPACK_VERBOSE' ;
23export const WORKER_ENV_KEY = 'REPACK_WORKER' ;
34
You can’t perform that action at this time.
0 commit comments