sveltejs / rollup-plugin-svelte

Compile Svelte components with Rollup
MIT License
505 stars 79 forks source link

breaking: Css Writer #136

Closed lukeed closed 4 years ago

lukeed commented 4 years ago

It's really a few fixes, but it since it is a change in the default behavior, safer to just call this breaking.

Doing so means we can also allow #126 to land (re: compatibility concerns) and take this opportunity to finally (!) declare useful peer dependency constraints, including Rollup@2x. (Fixing those can be a separate PR) Edit: #138

Changes

Our CSS Writer is broken. While it does work, it's not entirely useful given its environment. As of today (before this PR), the CssWriter class:

I included tests that ensure all these options are respected. And I made sure that when using hashed asset names (Rollup's default), that the sourcemap and CSS file correctly reference each other's hashed names.