-
Notifications
You must be signed in to change notification settings - Fork 53
Closed
Description
Environment
@sentry/webpack-plugin: 2.22.2
webpack: 5.92.1
Steps to Reproduce
Use a webpack config that creates files with query parameters. The common case is hashes, e.g.:
{
// ... snip
output: {
filename: "[name].js?contenthash=[contenthash]",
},
plugins: [ sentryWebpackPlugin() ]
}Expected Result
The debugid and metadata injection banner plugins would add banners to these files.
Actual Result
The files are emitted without the banner plugins adding banners.
This is because of these include regexes:
| include: /\.(js|ts|jsx|tsx|mjs|cjs)$/, |
A quick fix would be to expand the regex to allow query params:
/\.(js|ts|jsx|tsx|mjs|cjs)(\?.*?)?$/Alternatively, if I could specify my own regex for files that get banners, that might be a more flexible solution.
Happy to put up a PR with the query-allowing regex if that's the direction you prefer.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
No status