Fix sveltekit build issues
jakearchibald opened this issue · comments
Jake Archibald commented
The change was reverted because the libraries aren't all modules.
@philholden can you help me recreate the issue you have so I can test fixes before publishing?
Jake Archibald commented
The current recommendation is to change the module files to end .mjs
. I'm a little reluctant to do this, because:
- Requires a major version bump (which I'm not against, but only if necessary)
- Some common configs don't like
.mjs
Also, isn't this a bug with vite/svelte? This library uses conditional exports, so it shouldn't be trying to load a module as a cjs file or vice versa.
Phil Holden commented
Thanks Jake. Steps to reproduce are as follows:
git clone git@github.com:philholden/songkit.git
cd songkit
git checkout wrangler
npm install
npm run build
Jake Archibald commented
Hopefully this will sort it #129