windicss/svelte-windicss-preprocess

css keyframes are purged in 4.1

skytracer opened this issue · 2 comments

Describe the bug

Keyframes in Svelte components are removed in 4.1.x, but it is working in 4.0.12
For example, this component works fine in Svelte REPL

`

<style> svg { height: 100%; width: 100%; fill: transparent; stroke: red; stroke-width: 3; } circle { transform-origin: 50% 50%; stroke-dasharray: 1000; stroke-dashoffset: 100; display: block; } circle.animate { animation: circle-animation 1.5s 0.3s linear both infinite, rotation 0.75s 0.3s infinite linear; } @Keyframes rotation { from { transform: rotate(0deg); } to { transform: rotate(359deg); } } @Keyframes circle-animation { 0% { stroke-dashoffset: 1000; } 50% { stroke-dashoffset: 300; } 100% { stroke-dashoffset: 1000; } } </style>`

System Info

System:
    OS: macOS 12.0.1
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
    Memory: 180.26 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.17.1 - /usr/local/bin/node
    npm: 6.14.13 - /usr/local/bin/npm
  IDEs:
    Xcode: 13.1/13A1030d - /usr/bin/xcodebuild
  Browsers:
    Chrome: 96.0.4664.45
  npmPackages:
    svelte: ^3.44.1 => 3.44.1 
    svelte-windicss-preprocess: 4.0.12 => 4.0.12 
    windicss: ^3.2.1 => 3.2.1

Used Package Manager

npm

I think i found the issue. That should be fixed with 425b8b9
I will release a new version either today or tomorrow.

Works in 4.2.. however not quite stable yet