2021-02-16 08:43:26 +01:00
|
|
|
const { merge } = require('webpack-merge');
|
|
|
|
const common = require('./webpack.common.js');
|
2021-02-16 10:15:04 +01:00
|
|
|
const path = require('path');
|
2021-02-17 09:11:08 +01:00
|
|
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
2021-02-16 20:22:55 +01:00
|
|
|
|
2021-02-16 08:43:26 +01:00
|
|
|
module.exports = merge(common, {
|
2022-01-26 20:25:11 +01:00
|
|
|
mode: 'production',
|
|
|
|
devtool: 'source-map',
|
|
|
|
optimization: {
|
|
|
|
minimize: true,
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
template: path.join(__dirname, 'public/index.html'),
|
|
|
|
templateParameters: {
|
|
|
|
PUBLIC_URL: process.env.PUBLIC_URL
|
|
|
|
? process.env.PUBLIC_URL
|
|
|
|
: 'https://www.wisemapping.com',
|
|
|
|
},
|
|
|
|
base: process.env.PUBLIC_URL ? process.env.PUBLIC_URL : 'https://www.wisemapping.com',
|
|
|
|
}),
|
|
|
|
],
|
2021-02-16 08:43:26 +01:00
|
|
|
});
|