Added package.json to exports #12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "master"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This change would fix an error when loading this package with rollup-plugin-svelte
There's a lot of packages out there that don't explicitly list package.json in their exports. Does rollup-plugin-svelte not implement the fallback of resolving the module's main script and looking for package.json in that script's directory? I'm not sure I want to add this bit to all of my packages.
Sorry, I misspoke, this is just a warning that occurs, so it does function fine. However I am currently working on cleaning up all the warnings in a project and this is the only package I am encountering this warning for, and this warning is unable to be suppressed.
Here is said warning if that is helpful:
[rollup-plugin-svelte] The following packages did not export their
package.jsonfile so we could not check the "svelte" field. If you had difficulties importing svelte components from a package, then please contact the author and ask them to export the package.json file.My recommendation would be to submit a PR to the plugin that allows the warning to be suppressed. I know it seems a bit inflexible, but I've learned to push back on PRs that change things to work around issues in other tools, because before you know it the project is full of various obscure files and bits that you don't really understand the purpose of, and that probably bit-rotted years ago.
Ya, that's completely understandable. There is an issue that has been open for a while on that package, however from the looks of it, it is not possible to fallback to package.json as it is inaccessible without it being exported. There is a better explanation than I can give on this pull request that has the same changes as I am requesting.
Thanks for taking the time to reply btw!
Pull request closed