mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-10-30 00:27:43 +09:00
Our designer bundle heavily bloated with not analyzable commonjs generated by typescript. The biggest problem comes from bundled icons library which esbuild cannot tree shake because of cjs. Another issue is broken code splitting. Packages in one piece are appear in chunks and always loaded even with dynamic import and React.lazy. To solve this I migrated each package to native node es modules. Storybook and jest work almost without changes. Though it's not possible to run remix in esm project (while still esm packages can be bundled for ssr). And as a result designer jest failed because of cjs tests requires from esm packages. As a solution I generated additional commonjs artifacts in lib/cjs. du -ck public/build 2336 1736
2 lines
53 B
JavaScript
2 lines
53 B
JavaScript
export { default } from "@webstudio-is/jest-config";
|