Skip to content

Link query parameter not preserved #10186

@mooreolith

Description

@mooreolith

🐛 bug report

When specifying query paramters in an a-href attribute, the entire url parameter is stripped from the output file.

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

{
  "extends": ["@parcel/config-default"],
  "reporters": ["...", "parcel-reporter-static-files-copy"]
}

🤔 Expected Behavior

I expected a url's query parameters to be preserved as hard-coded.

😯 Current Behavior

Instead the url stays, but the query parameters are gone.

💁 Possible Solution

Keep an original version of the link.

🔦 Context

I am working on a web app, graph-editor, which has a /examples/ page. The graph-editor accepts query parameters for opening graphs and notebooks from url or localStorage. The links in the examples page look like this: .../graph-editor/?nburl=./examples/Example.ipynb. The example page does little more than hard link to some statically hosted example notebooks and graphs. For some reason, the query parameters don't show up in the output.

Sorry I don't have a code sample. This is not currently public, but if need be, I can try to recreate a minimal version.

🌍 Your Environment

Software Version(s)
Parcel 2.15
Node v22.16.0
npm 10.9.2
Operating System debian 13

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