with sentry/webpack-plugin, we can set release for code like:
new SentryPlugin({
release: {RELEASE},
});
is it default to Commit ID? how does a good RELEASE “should” be?
as we know, we alse need to set Raven.js config:
Raven
.config(’{DSN}’, {
release: ‘{REEASE}’
});
another problem is that SentryPlugin and Raven runs in different environments, how can i synchronized these? in especial, how get RELEASE in browser environment if we set RELEASE to be Commit ID refer to a repository?
So yeah, the default is the commit hash, it works best in conjunction with our release system and vcs integrations.
We inject the release version into you built bundle and raven-js picks it up if it’s there, so you shouldn’t have to do anything in order to get correct stack traces.
thx, that’s very helpful. However, I make project been built twice so that i could get two built bundles, one with sourcemap for sentry server (with the help of sentry-webpack-plugin) and the other bundle without sourcemap for CDN:joy:. It seems not graceful and efficient. What’s worse, the release version can’t been injected into bundle of production.
Then I get a a different way, I make project been built one time, then run a script (like: “rimraf build/**/*.map”) to delete map files. I wonder if there is any other ideas?