-
Notifications
You must be signed in to change notification settings - Fork 522
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
feat(typescript): add devmode_target, devmode_module, prodmode_target & prodmode_module attributes #1687
feat(typescript): add devmode_target, devmode_module, prodmode_target & prodmode_module attributes #1687
Conversation
packages/typescript/test/devmode_override/tsconfig-override.json
Outdated
Show resolved
Hide resolved
The TS bug is microsoft/TypeScript#36780. The workaround is needed because `ts_library` emits UMDs currently. This will change with bazelbuild/rules_typescript#492 and bazel-contrib/rules_nodejs#1687.
The TS bug is microsoft/TypeScript#36780. The workaround is needed because `ts_library` emits UMDs currently. This will change with bazelbuild/rules_typescript#492 and bazel-contrib/rules_nodejs#1687.
…UMDs The TS bug is microsoft/TypeScript#36780. The workaround is needed because `ts_library` emits UMDs currently. This will change with bazelbuild/rules_typescript#492 and bazel-contrib/rules_nodejs#1687.
…UMDs The TS bug is microsoft/TypeScript#36780. The workaround is needed because `ts_library` emits UMDs currently. This will change with bazelbuild/rules_typescript#492 and bazel-contrib/rules_nodejs#1687.
…UMDs The TS bug is microsoft/TypeScript#36780. The workaround is needed because `ts_library` emits UMDs currently. This will change with bazelbuild/rules_typescript#492 and bazel-contrib/rules_nodejs#1687.
9521ee4
to
9537994
Compare
Heya, one thing I want to highlight is that in the CLI we don't want this just for devmode. We want packages to be distributed in commonjs as well. |
Yup. I got that. By devmode output I'm referring the the ts_library rule's |
Waiting on approval on bazelbuild/rules_typescript#492 before landing this so that we don't diverge from rules_typescript on this. |
@gregmagolan thanks for explaining it to me, I did not know that's what |
…UMDs The TS bug is microsoft/TypeScript#36780. The workaround is needed because `ts_library` emits UMDs currently. This will change with bazelbuild/rules_typescript#492 and bazel-contrib/rules_nodejs#1687.
f7dfa41
to
5d373c0
Compare
After discussing with Evan Martin from Google and with Alex Eagle, decided to pivot here and use oss only ts_library attributes to configure the target & module in devmode & prodmode. The Matching prodmode attributes added for symmetry and consistency. |
… & prodmode_module attributes This allows users control over the language level & module formats produced by both the dev and prod outputs of ts_library
5d373c0
to
269bf37
Compare
Still LGTM |
…UMDs The TS bug is microsoft/TypeScript#36780. The workaround is needed because `ts_library` emits UMDs currently. This will change with bazelbuild/rules_typescript#492 and bazel-contrib/rules_nodejs#1687.
…UMDs The TS bug is microsoft/TypeScript#36780. The workaround is needed because `ts_library` emits UMDs currently. This will change with bazelbuild/rules_typescript#492 and bazel-contrib/rules_nodejs#1687.
…UMDs The TS bug is microsoft/TypeScript#36780. The workaround is needed because `ts_library` emits UMDs currently. This will change with bazelbuild/rules_typescript#492 and bazel-contrib/rules_nodejs#1687.
…UMDs The TS bug is microsoft/TypeScript#36780. The workaround is needed because `ts_library` emits UMDs currently. This will change with bazelbuild/rules_typescript#492 and bazel-contrib/rules_nodejs#1687.
This allows users control over the language level & module formats produced by both the dev and prod outputs of ts_library
NB: the tsconfig
bazelOpts.googmodule
if set will still override the module format to CommonJS &bazelOpts.devmodeTargetOverride
will trump thedevmode_target
attribute so this is non-breaking. In a future major releasebazelOpts.devmodeTargetOverride
will be removed.Control over devmode module format is requested by @filipesilva for the angular-cli bazel migration.
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