Spaces:
Running
Running
File size: 1,589 Bytes
f23825d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
const { merge } = require("webpack-merge")
const common = require("./webpack.common.js")
const BundleAnalyzerPlugin =
require("webpack-bundle-analyzer").BundleAnalyzerPlugin
const CopyPlugin = require("copy-webpack-plugin")
const { sentryWebpackPlugin } = require("@sentry/webpack-plugin")
module.exports = merge(common, {
mode: "production",
optimization: {
concatenateModules: false,
},
module: {
rules: [
{
test: /\.(j|t)sx?$/,
exclude: /node_modules/,
use: {
loader: "babel-loader",
},
},
],
},
plugins: [
new CopyPlugin({
patterns: [
{ from: "public/*.sf2", to: "[name][ext]" },
{ from: "public/*.svg", to: "[name][ext]" },
{ from: "public/*.png", to: "[name][ext]" },
{ from: "public/*.js", to: "[name][ext]" },
{ from: "public/*.webmanifest", to: "[name][ext]" },
{ from: "public/*.css", to: "[name][ext]" },
],
}),
new BundleAnalyzerPlugin({
analyzerMode: "static",
openAnalyzer: false,
}),
sentryWebpackPlugin({
authToken: process.env.SENTRY_AUTH_TOKEN,
org: "codingcafe_jp",
project: "signal",
release: process.env.VERCEL_GIT_COMMIT_SHA,
include: "./dist",
ignore: [
"node_modules",
"webpack.common.js",
"webpack.dev.js",
"webpack.prod.js",
],
dryRun: process.env.VERCEL_ENV !== "production",
debug: true,
errorHandler: (err) => {
console.warn("Sentry CLI Plugin: " + err.message)
},
}),
],
})
|