Skip to content

Unlisted CSS using preprocessor does not build css file #1580

@PortalCube

Description

@PortalCube

Describe the bug

I encountered a situation where I needed to add a stylesheet dynamically, so I tried using unlisted CSS. I created a .scss as unlisted CSS, but the scss file was not generated as a CSS output.

When adding regular .css as unlisted CSS, it works without any issues, so it seems like there's something wrong related to sass.

Reproduction

unlisted-css-bug.zip

Steps to reproduce

  1. npx wxt@latest init
  2. npm i
  3. npm i sass-embedded -D
  4. Create a file entrypoints/test.content.scss
  5. Run npm run dev or npm run build

Expected
A file named test.css should be generated in .output/chrome-mv3/content-scripts

Actual
The test.css file does not exist :(

System Info

System:
    OS: Windows 11 10.0.26100
    CPU: (16) x64 AMD Ryzen 9 6900HX with Radeon Graphics
    Memory: 11.68 GB / 27.69 GB
  Binaries:
    Node: 22.13.1 - C:\Program Files\nodejs\node.EXE
    npm: 11.1.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: 10.7.1 - ~\AppData\Local\pnpm\pnpm.CMD
  Browsers:
    Edge: Chromium (132.0.2957.140)
    Internet Explorer: 11.0.26100.1882

Used Package Manager

npm

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    pending-triageSomeone (usually a maintainer) needs to look into this to see if it's a bug

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions