-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Feature]: keep query in resolved path #1827
Comments
Thanks for the fix, but there's still an problem let examplePlugin = {
name: 'example',
setup(build) {
build.onResolve({ filter: /.*/ }, args => {
return { path: args.path, suffix: '?#iefix' }
})
build.onLoad({ filter: /.*/ }, args => {
console.log({ path: args.path, suffix: args.suffix })
})
},
} since onLoad relys on onResolve plugin to add suffix, so we had to implement onResolve plugin ourself, which is not a trivial problem(since build.internal_resolve is not supported yet), even we may implement internal_resolve ourself, it's not efficient |
That's not true. The built-in onResolve behavior also fills in the suffix, so your plugin does not need an onResolve callback at all to get the suffix. |
That's great, and |
the result is
if we use query to specify an virtual module which the lost query will cause an problem(like when handle vue compile)
The text was updated successfully, but these errors were encountered: