You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@define in Closure compiler is like environment variables in other build tools. It is a common practice for webpack or rollup to access environment variables in source code (process.env.NODE_ENV), so that the build tool replaces such expressions to a constant, and later a javascript minifier removes unvisited code blocks.
In closure compiler, such a functionality is achieved via @define JsDoc annotation. Can we provide a uniform API for conditional compilation that uses @define at closure compiler’s side and some custom plugin for rollup’s side?
Currently there are some caveats of using @define in goog.module scopes, angular/tsickle#434. Since we control closure compiler flags as well, I think it would be possible to implement an easy API.
The text was updated successfully, but these errors were encountered:
@define
in Closure compiler is like environment variables in other build tools. It is a common practice for webpack or rollup to access environment variables in source code (process.env.NODE_ENV
), so that the build tool replaces such expressions to a constant, and later a javascript minifier removes unvisited code blocks.In closure compiler, such a functionality is achieved via
@define
JsDoc annotation. Can we provide a uniform API for conditional compilation that uses@define
at closure compiler’s side and some custom plugin for rollup’s side?Currently there are some caveats of using
@define
ingoog.module
scopes, angular/tsickle#434. Since we control closure compiler flags as well, I think it would be possible to implement an easy API.The text was updated successfully, but these errors were encountered: