forked from AnthorNet/SC-InteractiveMap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.experimental.config.js
56 lines (49 loc) · 1.95 KB
/
webpack.experimental.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
'use strict';
const webpack = require('webpack');
const path = require('path');
const SentryWebpackPlugin = require('@sentry/webpack-plugin');
const TerserPlugin = require("terser-webpack-plugin");
const JsonMinimizerPlugin = require("json-minimizer-webpack-plugin");
const MergeJsonPlugin = require("merge-json-webpack-plugin");
module.exports = env => {
return {
mode : 'production',
devtool : 'hidden-source-map',
performance : { hints: false },
context : path.resolve(__dirname, 'src'),
entry : {
SCIM : './SCIM.js'
},
output : {
path : path.resolve(__dirname, 'build'),
filename : './[name]Experimental.js'
},
optimization : {
minimize : true,
minimizer : [
new TerserPlugin({test: /\.js(\?.*)?$/i}),
new JsonMinimizerPlugin({test: /\.json(\?.*)?$/i})
]
},
plugins: [
// Merge all detailed models into a single JSON file...
new MergeJsonPlugin({
group: [
{ files: './Models/*/*.json', to: './detailedModels.json' }
]
}),
// Send new release to Sentry
new SentryWebpackPlugin({
// sentry-cli configuration
url: env.SENTRY_URL,
authToken: env.SENTRY_AUTH_TOKEN,
org: "sentry",
project: "satisfactory-calculator",
// webpack specific configuration
validate: true,
include: path.resolve(__dirname, 'build'),
ignore: ['node_modules', 'webpack.config.js']
})
]
};
};