You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to suggest some changes that would make the package size a bit smaller. These are breaking changes, so would probably have to be done with the next major version.
The motivation for this suggestion is that learn.svelte.dev loads all Svelte dependencies and css-tree is the largest of those dependencies at 1.3 MB. If we're able to slim this down a bit then the tutorial could load a little faster for users.
One idea I had was possibly dropping the browser builds under dist. These are bundled versions of css-tree which makes it possible to load css-tree from a CDN. I would guess that the majority of users get css-tree from npm. The remaining users could switch to npm and build their own bundle saving 499 kB from the css-tree package.
Another, probably more controversial, idea would be dropping the CJS build. As more and more users switch to ESM the CJS build becomes less necessary and becomes extra weight. The cjs folder is 403 kB. ESM users can use the ESM version directly. CJS users can use the ESM version via dynamic import.
The text was updated successfully, but these errors were encountered:
I wanted to suggest some changes that would make the package size a bit smaller. These are breaking changes, so would probably have to be done with the next major version.
The motivation for this suggestion is that learn.svelte.dev loads all Svelte dependencies and
css-tree
is the largest of those dependencies at 1.3 MB. If we're able to slim this down a bit then the tutorial could load a little faster for users.One idea I had was possibly dropping the browser builds under
dist
. These are bundled versions ofcss-tree
which makes it possible to loadcss-tree
from a CDN. I would guess that the majority of users getcss-tree
from npm. The remaining users could switch to npm and build their own bundle saving 499 kB from thecss-tree
package.Another, probably more controversial, idea would be dropping the CJS build. As more and more users switch to ESM the CJS build becomes less necessary and becomes extra weight. The
cjs
folder is 403 kB. ESM users can use the ESM version directly. CJS users can use the ESM version via dynamic import.The text was updated successfully, but these errors were encountered: