forked from solomon-gumball/timeline-css
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.production.config.js
34 lines (32 loc) · 1016 Bytes
/
webpack.production.config.js
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
const path = require('path')
const webpack = require('webpack')
const SentryWebpackPlugin = require('@sentry/webpack-plugin')
const uuid = require('uuid')
const devConfig = require('./webpack.development.config')
const SENTRY_RELEASE = new Date()
.toLocaleString('en-US', { timeZone: 'PST', year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', hour12: false })
.replaceAll(', ', '-').replaceAll('/', '.').replaceAll(':', '.')
module.exports = {
...devConfig,
devtool: 'hidden-source-map',
mode: 'production',
devServer: undefined,
optimization: {
minimize: true,
},
plugins: [
new webpack.EnvironmentPlugin({
NODE_ENV: 'production',
SENTRY_RELEASE,
SENTRY_DSN: process.env.SENTRY_DSN,
OFFLINE_MODE: 'false',
}),
new SentryWebpackPlugin({
org: 'timelinecss',
project: 'web-app',
release: SENTRY_RELEASE,
entries: ['src/index.tsx'],
ignore: ['node_modules', 'webpack.config.js'],
}),
],
}