Skip to content

[RSC] Stylesheet reference is sometimes duplicated during development #10309

Description

@LostLuma

🐛 bug report

The link element to a page's stylesheet is sometimes duplicated when editing the CSS for a component used on that page. On consecutive occurrences of this problem, all existing link elements are duplicated, which can create an absurd amount of them over time.

🎛 Configuration (.babelrc, package.json, cli command)

A brand new project created using npm create parcel react-static.

🤔 Expected Behavior

When editing CSS, the old stylesheet reference is removed, and replaced with a new one.

😯 Current Behavior

The expected behavior happens most times, but sometimes the link element is duplicated instead.

💁 Possible Solution

🔦 Context

When this bug has occurred enough times, the browser (especially Firefox) becomes very unresponsive whenever a change is made to the page.

I've had more success recreating this bug in a project with more components that have their own CSS files.

💻 Code Sample

🌍 Your Environment

Software Version(s)
Parcel 2.16.4
Node 26.1.0
npm/Yarn 11.14.1
Operating System Arch Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions