File tree Expand file tree Collapse file tree 2 files changed +4
-12
lines changed
angular/app-types/angular-app-type Expand file tree Collapse file tree 2 files changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ export class AngularApp implements Application {
187187 logger : logger ,
188188 tempFolder : tempFolder ,
189189 envVars : {
190- ' process. env' : envVars
190+ process : { env : envVars }
191191 }
192192 } ) ;
193193 } else {
Original file line number Diff line number Diff line change 11import { Plugin , PluginBuild } from 'esbuild' ;
2+ import { merge } from 'lodash' ;
23
34export const stringifyDefine = ( define : any ) => {
45 return Object . entries ( define ) . reduce ( ( acc : any , [ key , value ] ) => {
@@ -11,18 +12,9 @@ export const stringifyDefine = (define: any) => {
1112 * Pass environment variables to esbuild.
1213 * @returns An esbuild plugin.
1314 */
14- export default function ( defineValues = { } ) {
15+ export default function ( defineValues : any = { } ) {
1516 // set variables on global so that they also work during ssr
16- const keys = Object . keys ( defineValues ) ;
17- keys . forEach ( ( key : any ) => {
18- // @ts -ignore
19- if ( global [ key ] ) {
20- throw new Error ( `Define plugin: key ${ key } already exists on global` ) ;
21- } else {
22- // @ts -ignore
23- global [ key ] = defineValues [ key ] ;
24- }
25- } ) ;
17+ merge ( global , defineValues ) ;
2618
2719 const plugin : Plugin = {
2820 name : 'env' ,
You can’t perform that action at this time.
0 commit comments