activated sourcemap in prod build, activated sentry sourcemap upload to glitchtip

This commit is contained in:
2025-03-21 17:11:07 +01:00
parent e8a7c0d190
commit ccbf8e9cfc
61 changed files with 596 additions and 15 deletions

View File

@@ -6,6 +6,11 @@ const baseConfig = require('./webpack.config.base')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const TerserPlugin = require("terser-webpack-plugin");
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const { sentryWebpackPlugin } = require("@sentry/webpack-plugin");
require('dotenv').config();
console.log(process.env);
module.exports = merge(baseConfig, {
mode: 'production',
@@ -68,12 +73,24 @@ module.exports = merge(baseConfig, {
})
],
},
devtool: 'source-map', // Ensure source maps are generated
plugins: [
sentryWebpackPlugin({
// Sentry-specific options
org: "figures-libres",
project: "materio.com",
authToken: process.env.SENTRY_AUTH_TOKEN,
url: "https://frontlog.figli.io",
release: process.env.RELEASE,
// urlPrefix: '~/', // Adjust based on your deployment setup
// include: './dist', // Adjust based on your output directory
// ignore: ['node_modules', 'webpack.config.js', 'build'],
}),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production')
}),
new BundleAnalyzerPlugin({
'analyzerMode': 'static'
}),
})
]
})