rollup-plugin-svelte icon indicating copy to clipboard operation
rollup-plugin-svelte copied to clipboard

Add option to ignore warnings

Open traed opened this issue 2 years ago • 3 comments

This PR adds an option in rollup.config.js to ignore warnings about package.json not being exported. See discussion in #181.

traed avatar Apr 01 '22 08:04 traed

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.

bluwy avatar Apr 01 '22 09:04 bluwy

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?

traed avatar Apr 01 '22 11:04 traed

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)

dominikg avatar Apr 03 '22 19:04 dominikg