Skip to content

Appending query string to .html import in a build.onResolve hook in a plugin crashes #28625

@vjpr

Description

@vjpr

What version of Bun is running?

1.3.11+af24e281e

What platform is your computer?

Darwin 25.3.0 arm64 arm

What steps can reproduce the bug?

A plugin like so:

  build.onResolve({filter: /.html$/}, args => {
    const env = 'browser'

    const path = args.path + `?env=${env}`
    //const path = args.path

    console.log({path})
    return {path}
  })

What is the expected behavior?

Should allow query strings to be passed along.

What do you see instead?

Crash

Additional information

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