Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strip query parameter in File import #16480

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pfgithub
Copy link
Contributor

What does this PR do?

Fixes #16476

Something I noticed: query parameters don't work at all in bun build

import text from "./b.txt?1";
import file from "./c.file?2";

console.log(text, file);
$> bun build --target=browser a.ts
1 | import text from "./b.txt?1";
                     ^
error: Could not resolve: "./b.txt?1"
    at a.ts:1:18

2 | import file from "./c.file?2";
                     ^
error: Could not resolve: "./c.file?2"
    at a.ts:2:18
Exited with code [1]

They should probably work and with --target=browser maybe even preserve the query parameter (but not for bun/node)

@robobun
Copy link

robobun commented Jan 17, 2025

Updated 2:09 PM PT - Jan 17th, 2025

@pfgithub, your commit 9b3fa33 has 3 failures in #9941:


🧪   try this PR locally:

bunx bun-pr 16480

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression: release 1.1.45 broke ?url imports
3 participants