Skip to content

Why are css comments being stripped out? #8235

@shirotech

Description

@shirotech

Describe the bug

Comments in CSS are being stripped out, and there seem to be no options to stop it. The use case is to allow 3rd-party tools like vite that uses vitePreprocess, and allow postcss plugins to process the comments correctly. e.g. disable certain features.

Reproduction

https://svelte.dev/repl/44822de64b7040369b5bf4d95fcf7da0?version=3.55.1

Check "CSS output" tab

Logs

No response

System Info

System:
    OS: macOS 13.1
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 33.45 GB / 64.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.13.0 - ~/.nvm/versions/node/v18.13.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v18.13.0/bin/yarn
    npm: 8.19.3 - ~/.nvm/versions/node/v18.13.0/bin/npm
  Browsers:
    Chrome: 109.0.5414.119
    Firefox: 107.0.1
    Safari: 16.2


### Severity

blocking certain usages

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions