|
|
@ -1,5 +1,5 @@ |
|
|
|
const nodeExternals = require('webpack-node-externals'); |
|
|
|
const nodeExternals = require('webpack-node-externals'); |
|
|
|
const webpack = require('webpack') |
|
|
|
const webpack = require('webpack'); |
|
|
|
const TerserPlugin = require('terser-webpack-plugin'); |
|
|
|
const TerserPlugin = require('terser-webpack-plugin'); |
|
|
|
|
|
|
|
|
|
|
|
module.exports = { |
|
|
|
module.exports = { |
|
|
@ -22,23 +22,19 @@ module.exports = { |
|
|
|
extensions: ['.tsx', '.ts', '.js', '.json'], |
|
|
|
extensions: ['.tsx', '.ts', '.js', '.json'], |
|
|
|
}, |
|
|
|
}, |
|
|
|
output: { |
|
|
|
output: { |
|
|
|
path: require('path').resolve("./docker"), |
|
|
|
path: require('path').resolve('./docker'), |
|
|
|
filename: "main.js", |
|
|
|
filename: 'main.js', |
|
|
|
library: 'libs', |
|
|
|
library: 'libs', |
|
|
|
libraryTarget: 'umd', |
|
|
|
libraryTarget: 'umd', |
|
|
|
globalObject: "typeof self !== 'undefined' ? self : this" |
|
|
|
globalObject: "typeof self !== 'undefined' ? self : this", |
|
|
|
}, |
|
|
|
}, |
|
|
|
optimization: { |
|
|
|
optimization: { |
|
|
|
minimize: true, //Update this to true or false
|
|
|
|
minimize: true, //Update this to true or false
|
|
|
|
minimizer: [new TerserPlugin()], |
|
|
|
minimizer: [new TerserPlugin()], |
|
|
|
nodeEnv:false |
|
|
|
nodeEnv: false, |
|
|
|
}, |
|
|
|
}, |
|
|
|
externals: [nodeExternals()], |
|
|
|
externals: [nodeExternals()], |
|
|
|
plugins: [ |
|
|
|
plugins: [new webpack.EnvironmentPlugin(['EE'])], |
|
|
|
new webpack.EnvironmentPlugin([ |
|
|
|
|
|
|
|
'EE' |
|
|
|
|
|
|
|
]), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
target: 'node', |
|
|
|
target: 'node', |
|
|
|
node: { |
|
|
|
node: { |
|
|
|
__dirname: false, |
|
|
|
__dirname: false, |
|
|
|