From 4edc610644f93d3e010215d4297403f69cdab513 Mon Sep 17 00:00:00 2001 From: Lukas Spirig Date: Wed, 27 Nov 2024 15:37:30 +0100 Subject: [PATCH] fix: remove deprecation notice for NG_ENV --- cli/ngssc_config.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cli/ngssc_config.go b/cli/ngssc_config.go index 6aeb43f..a382f38 100644 --- a/cli/ngssc_config.go +++ b/cli/ngssc_config.go @@ -73,10 +73,6 @@ func readNgsscJson(path string) (ngsscConfig NgsscConfig, err error) { return ngsscConfig, fmt.Errorf("invalid ngssc.json at %v (variant must either be process or NG_ENV)", path) } - if ngssc.Variant == "NG_ENV" { - fmt.Println("Variant NG_ENV is deprecated and will be removed with version 14. Please change usage to `process.env`.") - } - if ngssc.FilePattern == nil { filePatternDefault := "**/index.html" ngssc.FilePattern = &filePatternDefault @@ -108,7 +104,7 @@ func (ngsscConfig NgsscConfig) BuildIifeScriptContent() string { iife = fmt.Sprintf("self.NG_ENV=%v", envMapJSON) } else if ngsscConfig.Variant == "global" { iife = fmt.Sprintf("Object.assign(self,%v)", envMapJSON) - } else { + } else { iife = fmt.Sprintf(`self.process={"env":%v}`, envMapJSON) }