parcel icon indicating copy to clipboard operation
parcel copied to clipboard

Link query parameter not preserved

Open mooreolith opened this issue 7 months ago • 1 comments

🐛 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

mooreolith avatar Jun 12 '25 00:06 mooreolith

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs.

github-actions[bot] avatar Dec 09 '25 12:12 github-actions[bot]