Skip to content

All the stylesheets CSS file loading twice on build #12940

@khanakia

Description

@khanakia

I'm using React Router as a...

framework

Reproduction

System Info

(main) ✗ npx envinfo --system --npmPackages '{vite,react-router,@react-router/*}' --binaries --browsers

  System:
    OS: macOS 14.6.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 1.01 GB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.12.0 - ~/.nvm/versions/node/v22.12.0/bin/node
    npm: 10.9.0 - ~/.nvm/versions/node/v22.12.0/bin/npm
    pnpm: 9.15.3 - ~/.nvm/versions/node/v22.12.0/bin/pnpm
    bun: 1.2.2 - ~/.bun/bin/bun
    Watchman: 2024.12.02.00 - /opt/homebrew/bin/watchman
  Browsers:
    Brave Browser: 132.1.74.51
    Chrome: 132.0.6834.160
    Edge: 122.0.2365.92
    Safari: 18.0
  npmPackages:
    @react-router/dev: ^7.1.3 => 7.1.5 
    @react-router/fs-routes: ^7.1.3 => 7.1.5 
    @react-router/node: ^7.1.3 => 7.1.5 
    @react-router/serve: ^7.1.3 => 7.1.5 
    react-router: ^7.1.3 => 7.1.5 
    vite: ^6.0.11 => 6.0.11

Used Package Manager

pnpm

Expected Behavior

It should load the CSS file only once

Actual Behavior

It's loading the CSS file twice with same Code inside

Image

Image

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions