-
Notifications
You must be signed in to change notification settings - Fork 3
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
Switch to SWC Compiler #1719
base: main
Are you sure you want to change the base?
Switch to SWC Compiler #1719
Conversation
|
Ad load time test resultsFor Test conditions:
|
@@ -35,7 +35,7 @@ const prebidVersion = () => { | |||
const loadPrebid = async (framework: ConsentFramework): Promise<void> => { | |||
if (shouldLoadPrebid()) { | |||
await import( | |||
/* webpackChunkName: "Prebid.js" */ | |||
/* webpackChunkName: "[request]" */ |
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 gives us nicer names for the localised prebid chunks
What does this change?
Migrate to use https://swc.rs for transpiling and minification instead of typescript and babel.
swc is widely used including by guardian/dotcom-rendering
Why?
SWC is much faster, and usually produces smaller bundle sizes, although in our case it's a very minor reduction in bundle size.
The numbers
Build times
Dev
Prod
Bundle sizes
Including all prebid bundles
Including just uk prebid bundle (More demonstrative as only one bundle is ever served to a user)