rollup-plugin-svelte
rollup-plugin-svelte copied to clipboard
Add option to ignore warnings
This PR adds an option in rollup.config.js to ignore warnings about package.json not being exported. See discussion in #181.
We had discussed about the warning a while ago and agreed to remove it altogether, so another option here is not needed. vite-plugin-svelte had already done so at https://github.com/sveltejs/vite-plugin-svelte/pull/272.
This is also in my todo list for rollup-plugin-svelte but never got to it. Feel free to tackle it if you like. Besides removing the warning, we also need to manually read the package.json
like in vite-plugin-svelte. The refactoring required is a bit large.
Ok. I'm not super confident in the inner workings of this, but I've made a few changes now to port the recursive check from vite-plugin-svelte. Perhaps that will ease the workload for you?
this looks ok for me, would be great to validate that it works as expected on windows.
The logic of resolving the "svelte" field in package.json isn't really bundler dependant so i wonder if this was something that could/should live in it's own package to be reusable? (out of scope for this PR)