I’m trying to rewrite the mapping URL for Sentry to find the sourcemaps correctly.
Our JS is stored in:
<URL>/<STAGE>/client/<FILES>- (Production has
<STAGE>removed)
Our webpack build step outputs to dist, but when we upload to our CDN it gets moved and dist is no longer in the path.
We have the config:
new SentryWebpackPlugin({
include: ".",
ignore: ["node_modules", "webpack.config.js"],
urlPrefix: '<URL INCLUDING STAGE>/client',
stripPrefix: ['dist'],
})
But the source maps get mapped to:
<URL>/<STAGE>/client/dist/<FILES>
How do we get rid of dist using the Webpack plugin? Or do I give up on the webpack plugin and just use the CLI?
tldr;
- We want:
<URL>/<STAGE>/client/<FILES> - We get:
<URL>/<STAGE>/client/dist/<FILES>