orlov-vo / parcel-transformer-svelte

Parcel 2 transformer for Svelte 3
https://www.npmjs.com/package/parcel-transformer-svelte
MIT License
40 stars 18 forks source link

Duplicated CSS #8

Closed canadaduane closed 3 years ago

canadaduane commented 3 years ago

@jsonkao reported this same issue in parcel-plugin-svelte for Parcel 1.x:

https://github.com/DeMoorJasper/parcel-plugin-svelte/issues/138

I've made a reproducible test case, based on his original case here: https://github.com/canadaduane/svelte-parcel-duplicate-styles

From jsonkao:

Styles are being duplicated. In a Svelte component like…

<div></div>

<style>
  div {
    background: red;
    width: 100px;
    height: 100px;
  }
</style>

…DevTools shows these styles:

image
canadaduane commented 3 years ago

See also https://github.com/sveltejs/sapper/issues/1076 which inspired the fix.

jsonkao commented 1 year ago

Hi! Coming back to this issue three years later lol… what if I do want CSS inlined? And I don't at all want the <link> to reference a diferent stylesheet?