carbon-components-svelte
carbon-components-svelte copied to clipboard
breaking: drop support for ES, UMD formats
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.
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 Thank you for the info! Good to know that there are potential use cases for the bundled code.