design-system
design-system copied to clipboard
chore/webpack chunks
- Experimenting with webpack chunks
What does it do?
Describe the technical changes you did.
Why is it needed?
Describe the issue you are solving.
How to test it?
Provide information about the environment and the path to verify the behaviour.
Related issue(s)/PR(s)
Let us know if this is related to any issue/pull request
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated |
---|---|---|---|
design-system | ✅ Ready (Inspect) | Visit Preview | Aug 26, 2022 at 5:34PM (UTC) |
design-system-website | ✅ Ready (Inspect) | Visit Preview | Aug 26, 2022 at 5:34PM (UTC) |
@joshuaellis I'd like to have your opinion on this PR please
I'm not sure chunking would help? Isn't the issue here that when we build the library we wrap up Flex
as a production
ready file that includes Box
as it's dep, but isn't it too early to be doing this? It then causes Box
to be included multiple times.
This could always be to do with the fact we're releasing a UMD bundle. I think to solve the issue we probably want to be releasing a ESM
, CJS
and UMD
version of the library.
The only example I can think of that I know works (doesn't duplicate it's imports from it's own lib) is https://github.com/pmndrs/drei where we import OrbitControls
into the Stage
component, when you build both the ESM & CJS version are using their respective versions of import
to bring in the OrbitControls
, so I assume when people build their packages / apps / libraries only one version of the OrbitControls
is there.
We've merged a beta for using vite
so i think we can close this.