moved sentry plugin to the end so sourcemaps are generated correctly

This commit is contained in:
Nikhil Nandagopal 2020-09-03 01:17:49 +05:30
parent 5949ad8343
commit 28f70e911f
2 changed files with 16 additions and 16 deletions

View File

@ -8,21 +8,6 @@ const env = process.env.REACT_APP_ENVIRONMENT;
const plugins = [];
if (env === "PRODUCTION" || env === "STAGING") {
plugins.push(
new SentryWebpackPlugin({
include: "build",
ignore: ["node_modules", "webpack.config.js"],
setCommits: {
auto: true
},
release: process.env.REACT_APP_SENTRY_RELEASE,
deploy: {
env: process.env.REACT_APP_SENTRY_ENVIRONMENT
}
}),
);
}
plugins.push(
new WorkboxPlugin.InjectManifest({
swSrc: "./src/serviceWorker.js",
@ -32,6 +17,21 @@ plugins.push(
}),
);
if (env === "PRODUCTION" || env === "STAGING") {
plugins.push(
new SentryWebpackPlugin({
include: "build",
ignore: ["node_modules", "webpack.config.js"],
setCommits: {
auto: true
},
deploy: {
env: process.env.REACT_APP_SENTRY_ENVIRONMENT
}
}),
);
}
module.exports = merge(common, {
webpack: {
plugins: plugins,

View File

@ -136,8 +136,8 @@ export const getAppsmithConfigs = (): AppsmithUIConfigs => {
APPSMITH_FEATURE_CONFIGS.sentry.release,
);
const sentryENV = getConfig(
APPSMITH_FEATURE_CONFIGS.sentry.environment,
ENV_CONFIG.sentry.environment,
APPSMITH_FEATURE_CONFIGS.sentry.environment,
);
const segment = getConfig(
ENV_CONFIG.segment,