jakearchibald / idb-keyval

A super-simple-small promise-based keyval store implemented with IndexedDB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix sveltekit build issues

jakearchibald opened this issue · comments

Previously: #124 #125

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?

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.

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

Hopefully this will sort it #129