-
Notifications
You must be signed in to change notification settings - Fork 222
Multi-build support (cjs, esm, esnext) for all quilt packages #1698
Conversation
531c140
to
3f9f2cf
Compare
481a785
to
8d9eb8f
Compare
a823d3e
to
45088f4
Compare
30c5e8a
to
fef0de7
Compare
This seems legit, still looking into this. I recall we had tophat related issues with sk-next built libraries. @gmcgibbon took at stab a fixing this with https://github.com/Shopify/sewing-kit-next/pull/98. I'll see if we can find a solution for quilt.
Fixed with fef0de7
I wasn't able to reproduce this. Can you see if this works? |
66ca206
to
5b16036
Compare
0983ab0
to
8b83b90
Compare
🎩 'd on shirnk-ray (https://github.com/Shopify/shrink-ray/pull/1718). As expected we're getting noticeable reductions in the vendor bundle size. Update: Merged/Deployed to staging. All is good 👍 |
@michenly
|
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.
Tested 2 & 3 again and those seems to be resolved. tophat
regression while annoying we can deal with that in a separate PR.
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.
Code looks good,
Bundle size changes look great, a bit worried about cold-cache build times but seems inescapable given multi-format builds...
751e044
to
82a07de
Compare
Update changelogs for multi-build support
Hey! 👋🏻 I believe this PR broke |
Description
This PR migrates quilts build system to SK-next (shopify/sewing-kit-next) to provide multiple build outputs (cjs, esm, esnext). Most of this PR is a revive of our previous exploration. The benefit of migrating our build system over to SK-next is because our tooling leverages
esnext
supported packages to provide treeshaking. In our previous exploration, we also consumed these changes into an app, where we noted significant bundle size decreases.Why such a big PR? Over 300 file changes
We currently have 69 packages in quilt. Migrating only some and not all will be a very wonky dev experience. Please call me out on parts I can break out 😄 .
Summary of changes
sewing-kit.config.ts
that encompasses all the workspace level configs. Workspace refers to the whole monorepo, think of yarn workspaces.config/sewing-kit/index.ts
which is used as an SK config that is consumed by all other package level SK-next configs.sewing-kit.config.ts
file for each packageOverall CI times
NOTE: Cold builds have regressed ~2x because the builds are generating over twice as many build files than they were previously.
Why do we need to do this anyways?
esnext
builds provide better tree-shaking support for our quilt packages . 🎩 'd on shirnk-ray (https://github.com/Shopify/shrink-ray/pull/1718). As expected we're getting noticeable reductions in the vendor bundle size.🎩
The team did a thorough 🎩 during #1538 so much of this is 👍.
I also 🎩 'd on shirnk-ray (https://github.com/Shopify/shrink-ray/pull/1718)
For reviews a simple
yarn run build
should suffice.Type of change
Checklist