-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[webpack-build-scripts] feat: migrate to swc #6453
Conversation
Remove extraneous depBuild artifact links for this commit: documentation | landing | table | demoThis is an automated comment from the deploy-preview CircleCI job. |
Looks like there are now some issues with
Perhaps we should make this loader function configurable so it is easier to test... |
[datetime2] fix test typecheckBuild artifact links for this commit: documentation | landing | table | demoThis is an automated comment from the deploy-preview CircleCI job. |
Some more interesting findings related to testing with SWC. It turns out that ts-loader was providing us a convenience which does not line up with the official more "strict" behavior of ES modules, specifically the fact that it allowed modules to export configurable and writable properties which could easily be stubbed or overridden by
edit: it looks like the seams approach doesn't play nicely with TypeScript / ESM, I get the following errors. So it's better to go with the first option.
|
[table] fix DragSelectable testsBuild artifact links for this commit: documentation | landing | table | demoThis is an automated comment from the deploy-preview CircleCI job. |
Changes proposed in this pull request:
ts-loader
toswc-loader
static
option to fix HMRreact-refresh-typescript
(no longer required)importsNotUsedAsValues: "error"
tsc option and annotate all type-only imports & exports in TypeScriptcoverageExcludes
to skip checking coverage on barrel files (index.ts
in various locations) since the emitted.js
files now look a little different and there seem to be more lines of code emitted, which Istanbul tries to instrument for coveragets-loader
was more lenient about this, it generated writable module exports which Sinon could more easily stub)Reviewers should focus on:
✅ test suites run all tests successfully
✅ TypeScript errors still fail the webpack production build:
✅ And the dev build (with webpack overlay):
Screenshot
✅ HMR works (fast):