We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c6218e commit 265e4d4Copy full SHA for 265e4d4
packages/vite/src/node/plugins/asset.ts
@@ -305,8 +305,8 @@ export function assetPlugin(config: ResolvedConfig): Plugin {
305
306
function addQueryToRegex(input: RegExp) {
307
return new RegExp(
308
- // replace `$` with `\?.*?$` (ignore `\$`)
309
- input.source.replace(/(?<!\\)\$/g, '\\?.*?$'),
+ // replace `$` with `(?:\?.*)?$` (ignore `\$`)
+ input.source.replace(/(?<!\\)\$/g, '(?:\\?.*)?$'),
310
input.flags,
311
)
312
}
0 commit comments