Skip to content

Commit

Permalink
do not upload sourcemaps
Browse files Browse the repository at this point in the history
  • Loading branch information
blarfoon committed Feb 11, 2022
1 parent c2aa723 commit bfd8cdc
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions craco.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
/* eslint-disable no-param-reassign */

const CracoAntDesignPlugin = require('craco-antd');
const SentryCliPlugin = require('@sentry/webpack-plugin');
const os = require('os');
const packageJson = require('./package.json');
// const SentryCliPlugin = require('@sentry/webpack-plugin');
// const os = require('os');
// const packageJson = require('./package.json');

module.exports = () => {
return {
Expand Down Expand Up @@ -78,26 +78,26 @@ module.exports = () => {
}
}
};
if (process.env.SOURCE_MAPS_UPLOAD) {
webpackConfig.plugins.push(
new SentryCliPlugin({
include: [
'./build/electron.js',
'./build/electron.js.map',
'./build/static/js/*'
],
ignore: ['native'],
org: 'gdlauncher',
project: 'react',
authToken: process.env.SENTRY_AUTH,
url: process.env.SOURCE_MAPS_UPLOAD,
release: packageJson.version,
dist: `${process.env.REACT_APP_RELEASE_TYPE}-${os.platform()}`
})
);
} else {
console.log('Not a release. Skipping source maps upload.');
}
// if (process.env.SOURCE_MAPS_UPLOAD) {
// webpackConfig.plugins.push(
// new SentryCliPlugin({
// include: [
// './build/electron.js',
// './build/electron.js.map',
// './build/static/js/*'
// ],
// ignore: ['native'],
// org: 'gdlauncher',
// project: 'react',
// authToken: process.env.SENTRY_AUTH,
// url: process.env.SOURCE_MAPS_UPLOAD,
// release: packageJson.version,
// dist: `${process.env.REACT_APP_RELEASE_TYPE}-${os.platform()}`
// })
// );
// } else {
// console.log('Not a release. Skipping source maps upload.');
// }
webpackConfig.resolve.aliasFields = [];
webpackConfig.resolve.mainFields = ['module', 'main'];
webpackConfig.resolve.alias = {
Expand Down

0 comments on commit bfd8cdc

Please sign in to comment.