isaacHagoel / svelte-dnd-action

An action based drag and drop container for Svelte
MIT License
1.67k stars 100 forks source link

fix: add import and require exports #528

Closed iamsbro closed 5 months ago

iamsbro commented 5 months ago

The package types were not able to be resolved with the new exports field being added. This PR fixes that by defining the import and require properties in exports.

References:

Side note: I'm not sure why the svelte property is targeting src/index.js rather than dist/index.js. I tested using dist locally and my SvelteKit project compiled and ran without issues.

isaacHagoel commented 5 months ago

Thanks for this. Using "dist" in the "svelte" entry caused this issue. Svelte is a compiler so it wants access to the source files which does make sense (that way it can compile them together with the app, tree shake etc). Can you please bump the version in package.json and add an entry in release-notes.md?