carbon-components-svelte icon indicating copy to clipboard operation
carbon-components-svelte copied to clipboard

breaking: drop support for ES, UMD formats

Open metonym opened this issue 3 years ago • 2 comments

Fixes #896, fixes #1427

This PR drops support for the compiled ES, UMD formats. Instead, only the uncompiled Svelte source code will be shipped.

This should have no impact for users of Vite/SvelteKit/Webpack/Rollup. This solves issues for set-ups that experience errors using the compiled code (#896). A bonus is that the carbon-components-svelte package will be considerably lighter in size.

metonym avatar Jan 10 '22 22:01 metonym

FYI there's a feature request in SvelteKit which would enable also bundling to ESM/UMD: https://github.com/sveltejs/kit/issues/2572 . There are valid cases where you would want people to be able to use your library standalone. If that's the case for carbon-components-svelte is another question. An alternative (still a breaking change) would be to add the compiled versions, but within special sub folders, so you would do something like import { ... } from 'carbon-components-svelte/umd'. This is likely also the way this gets implemented in SvelteKit.

dummdidumm avatar Jan 14 '22 12:01 dummdidumm

@dummdidumm Thank you for the info! Good to know that there are potential use cases for the bundled code.

metonym avatar Jan 14 '22 15:01 metonym