-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[Breaking change] babel-loader => ts-loader in web build builder 8.5.0 #1836
Comments
Looked into the implications of this change more in detail. Reading through the |
@emilio-martinez Hey, thanks taking the time to report this issue. The main objective for moving to babel-loader is that babel is used in most non-Angular projects (React, Vue, etc.), so it makes sense to support the majority use case. This means we won't be moving back to ts-loader for the web builder. As for differential loading and e2e tests, we've decided that it's in everyone's best interest to have differential loading on. It makes the experience much better for endusers on modern browsers, so there isn't a good reason to turn it off. The e2e tests were update reflect the changes for differential loading between previous ts-loader implementation vs the babel-loader implementation. Since we won't be supporting ts-loader in web builder moving forward, I'm going to close this issue. If there is anything we can change to make the babel-loader experience better please let us know! |
@jaysoo Thanks for the response. I'm not arguing for you to revert, and I appreciate you trying to justify your change, but what I'm simply calling out is that it's a breaking change. In other words, you didn't follow semver, and now we're facing having to refactor internal and client applications that are breaking for what you published as a minor version bump of your lib. Fortunately, the fix is simple—bump up a major version. |
By the way, our breaking projects are not Angular-based. |
Our codebase broke wrt namespaces, const enums, decorators, and more. @jaysoo Can't we have the Typescript compiler in transpileOnly mode pipe output to Babel, with the option of disabling Babel altogether? Then in parallel use the ForkTsChecker plugin. This may seem like it may make the builds slower, but '@babel/preset-typescript' is already installed in babel, which you can now remove if you first pipe through tsc before babel. |
@atifsyedali Hey, thanks for chiming in. I don't think it'll quite work with using |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Please make sure you have read the submission guidelines before posting an issue
Expected Behavior
Being able to use all Typescript features.
Current Behavior
babel-loader
doesn't support all Typescript features, e.g., const enum, likets-loader
does.Failure Information (for bugs)
See also babel/babel#8741.
Steps to Reproduce
Just run a web project build that includes
const enums
.Context
Please provide any relevant information about your setup:
Version of Nx used:
8.5.0
Relevant commit: 811c50b
Relevant PR: #1792
Other
The below are other potential breaking changes that are related only in that they were done in the same commit/PR. Happy to move these into separate issues if preferable. In no particular order:
The text was updated successfully, but these errors were encountered: