-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
build(webpack): Use fork-ts
webpack plugin
#15587
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
Conversation
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.
Neat. 👏 for faster local builds.
8d4d501
to
9d99e2f
Compare
fork-ts
webpack plugin [WIP]fork-ts
webpack plugin
OK tested this with wrong types and CI fails properly. |
34b5c86
to
eb90818
Compare
Do we have numbers for the speed up? |
For TSX files (and incremental builds) I was seeing times from:
|
eb90818
to
69e68b1
Compare
What needs to be done to getsentry for this? |
@evanpurkhiser Hmm what's the current state of ts in |
No we don't, but building sentry happens in getsentry, thus having typescript configs over there, so we may potentially need to mirror things over there. |
We extend sentry config in getsentry though, so it should build sentry with sentry's webpack config, right? |
69e68b1
to
9f1b02f
Compare
I've tested this and it rebuilds in sentry (edit: getsentry) using the fork plugin fine |
3102919
to
06051a8
Compare
06051a8
to
c8c3ead
Compare
@billyvg please fix conflicts :) |
webpack.config.js
Outdated
transpileOnly: false, | ||
}, | ||
}, | ||
...(!IS_CI |
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 kind of dislike this style prop spreading, I think it's a tad hard to read) but 🤷♂
I'd maybe prefer to have variables for like, tsLoaderConfig
and bableLoaderConfig
and then down here have
...(!IS_CI ? [bableLoaderConfig] : [tsLoaderConfig]),
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.
hmmm the spread doesn't look like it's even necessary either
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.
This looks good to me
Not sure if needed, but might want to check if similar needs to be done for |
b575a16
to
e323b83
Compare
Ugh Percy snapshots do not check out, holding off on mergin |
This is the emotion problem we are facing: emotion-js/emotion#1748 - The last time I updated the PR was before the emotion 10 change, so we did not see these percy diffs. Edit: looks like it's just an issue with a ts configuration (preserve JSX). |
f365736
to
427474a
Compare
…der for tsx files
This reverts commit 72d8e8899d1fb28637aeae478ac8ec18bc23efa3.
… preserve in order for eslint plugins to work
427474a
to
40a3dc8
Compare
This should decrease build times since we are only running either
babel-loader or ts-loader and not both. We should skip typechecking for
local dev (and instead run type checking in a forked process) and always
run type checking in CI.
This will also skip typechecking when building prod assets (which should
be fine since we run them in CI).
👀👀