Closed dfreeman closed 2 years ago
Hi @Anidetrix — is there anything I can do from my side to help move this and #214 forward? We'd love to be able to adopt rollup-plugin-styles
for our projects but are currently blocked on needing something like #214 🙂
I opened #216 and then I saw this PR. @dfreeman Thanks!
However I am finding that just bumping cssnano throws the following error in the tests:
src/index.ts:280:28 - error TS2352: Conversion of type 'Plugin' to type 'Processor' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
Type 'Plugin' is missing the following properties from type 'Processor': version, plugins, use, process
@CxRes if you check the diff here, you can see where I had to change the code in this plugin in a couple of places to accommodate the new types—it's pretty common when shifting from DefinitelyTyped to natively-published types for a package that there is some breakage like that.
212 removed
@types/cssnano
as being unnecessary, butcssnano
itself didn't begin shipping types until 5.1, and those types weren't 100% compatible with what had been in@types/cssnano
.For whatever reason it looks like CI didn't run on that pull request, though, so the issue wasn't flagged.
This PR updates the
cssnano
dependency so that its types are available, and fixes a couple of references so that everything typechecks cleanly.