forked from PIVX-Labs/MyPIVXWallet
-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.prod.js
28 lines (25 loc) · 885 Bytes
/
webpack.prod.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
/* istanbul ignore file */
/* eslint-env node */
/* eslint @typescript-eslint/no-var-requires: "off" */
import { merge } from 'webpack-merge';
import common from './webpack.common.js';
import CssMinimizerPlugin from 'css-minimizer-webpack-plugin';
import webpack from 'webpack';
import { readFileSync } from 'fs';
const version = JSON.parse(
readFileSync('./package.json', { encoding: 'utf8' })
).version;
export default merge(common, {
mode: 'production',
optimization: {
// Inject a CSS minimizer alongside the default JS minimizer (the '...' is the inclusion of the default webpack JS minimizer!)
minimizer: [new CssMinimizerPlugin(), '...'],
},
plugins: [
new webpack.DefinePlugin({
__VUE_OPTIONS_API__: false,
__VUE_PROD_DEVTOOLS__: false,
VERSION: JSON.stringify(version),
}),
],
});