Skip to content

new URL("/my/file.js?wow", import.meta.url) doesn't provide "?wow" param to a plugin #15312

Description

@wclr

Describe the bug

new URL("/my/file.js?wow", import.meta.url)

doesn't provide "?wow" param in resolveId or transform handlers. In transform /my/file.js?type=classic&worker_file but no custom "wow" param.

Reproduction

https://stackblitz.com/edit/vitejs-vite-kjwrqy?file=vite.config.js,main.js,index.html&terminal=dev

In the terminal you may see (no ?wow param)

resolve id /test.js?type=module&worker_file
resolve id /test.js?type=module&worker_file

Steps to reproduce

new URL("/my/file.js?wow", import.meta.url)

Create plugin with resolveId and trasnform and see id.

System Info

VITE v5.0.7

Used Package Manager

pnpm

Logs

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions