idoros / zeejs

Layering in HTML
MIT License
7 stars 0 forks source link

Fix Svelte publish #30

Closed idoros closed 4 years ago

idoros commented 4 years ago

@zeejs/svelte didn't build source files (*.svelte) to esm/cjs.

Honestly I'm not sure what is the best practice for publishing Svelte components, but it seems that if you have a Svelte project, you would want the 3rd party source files so you can configure how to build/use them.

In addition I added ~a .svelte.js file next to each .svelte file in the esm output~ a dist folder with only esm files and a package.json browser field referring to the index in the dist to allow bundelphobia to pickup the size of the package for browser bundling. Hopefully no one that would use a build with Svelte would pickup ~.svelte.js files before .svelte files~ the browser folder 🤞 .