Skip to content

Instantly share code, notes, and snippets.

@grakic
Created December 5, 2019 19:04
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save grakic/87a055d3a8eff8cdf179df5d3f277d71 to your computer and use it in GitHub Desktop.
const webpack = require('webpack');
const SentryCliPlugin = require('@sentry/webpack-plugin');
module.exports = {
entry: './src/index.js',
target: 'webworker',
mode: 'production',
output: {
path: __dirname + '/dist',
publicPath: 'dist',
filename: 'worker.js',
sourceMapFilename: 'worker.js.map'
},
optimization: {
minimize: false,
},
performance: {
hints: false,
},
devtool: 'source-map',
plugins: [
new webpack.DefinePlugin({
SENTRY_DSN: JSON.stringify(process.env.SENTRY_DSN),
RELEASE: JSON.stringify(process.env.RELEASE)
}),
new SentryCliPlugin({
include: './dist',
ignore: ['node_modules', 'webpack.config.js', 'webpack.prod.js'],
validate: true,
release: process.env.RELEASE,
stripPrefix: ['webpack:///',]
})
],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment