New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: add ngJitMode to ng_rollup_bundle terser config #33773
build: add ngJitMode to ng_rollup_bundle terser config #33773
Conversation
768224c
to
13b1a24
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that we are moving the config to this repo, but I have a few questions.
{ | ||
"compress": { | ||
"global_defs": {"ngDevMode": false, "ngI18nClosureMode": false, "ngJitMode": false}, | ||
"keep_fnames": "bazel_no_debug", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is "bazel_no_debug"? where does it come from? seems odd...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its part of the terser_minified
rule.
If you use the magic strings "bazel_debug" or "bazel_no_debug", these will be replaced with true and false respecting the value of the debug attribute or the --define=DEBUG=1 bazel flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Naming is a little odd perhaps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It changes the configuration based on the debug
attribute here: _terser_minified(name = name + ".min_debug", src = name, debug = True, visibility = visibility)
c54e0aa
to
a52fea9
Compare
3b029d5
to
01eb4a5
Compare
01eb4a5
to
547ede1
Compare
bbb3a25
to
f251057
Compare
78f5d7e
to
de8c34e
Compare
This adds a `tools/ng_rollup_bundle/terser_config.json` file to override the default terser_minified config provided by the rule. After this change, the layer violation in rules_nodejs can be fixed by removing `"global_defs": {"ngDevMode": false, "ngI18nClosureMode": false},` from `terser_config.default.json` in rules_nodejs. Change requested by Alex Rickabaugh in bazelbuild/rules_nodejs#1338.
de8c34e
to
5bfe850
Compare
This adds a `tools/ng_rollup_bundle/terser_config.json` file to override the default terser_minified config provided by the rule. After this change, the layer violation in rules_nodejs can be fixed by removing `"global_defs": {"ngDevMode": false, "ngI18nClosureMode": false},` from `terser_config.default.json` in rules_nodejs. Change requested by Alex Rickabaugh in bazelbuild/rules_nodejs#1338. PR Close #33773
This reverts commit c89eed5. Reason: fails on Windows CI
This reverts commit c89eed5. Reason: fails on Windows CI
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This adds a
tools/ng_rollup_bundle/terser_config.json
file addingngJitMode
and overriding the default terser_minified config provided by the rule.Change requested by @alxhub in bazelbuild/rules_nodejs#1338.
After this change, the layer violation in rules_nodejs can be fixed by removing
"global_defs": {"ngDevMode": false, "ngI18nClosureMode": false},
fromterser_config.default.json
in rules_nodejs.PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information