Skip to content

Commit

Permalink
fix: remove deprecation notice for NG_ENV (#112)
Browse files Browse the repository at this point in the history
Closes #111
  • Loading branch information
kyubisation authored Nov 27, 2024
1 parent 45bcdf4 commit 2cfd956
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions cli/ngssc_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
}

Expand Down

0 comments on commit 2cfd956

Please sign in to comment.