@epilot360/webpack-config-epilot360 2.5.7 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -7,7 +7,7 @@ const HtmlWebpackPlugin = require("html-webpack-plugin");
|
|
|
7
7
|
const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin");
|
|
8
8
|
const StandaloneSingleSpaPlugin = require("standalone-single-spa-webpack-plugin");
|
|
9
9
|
const SystemJSPublicPathPlugin = require("systemjs-webpack-interop/SystemJSPublicPathWebpackPlugin");
|
|
10
|
-
const
|
|
10
|
+
const TerserPlugin = require("terser-webpack-plugin");
|
|
11
11
|
const resolveCwd = require('resolve-cwd');
|
|
12
12
|
const env = require('./env')()
|
|
13
13
|
|
|
@@ -54,10 +54,14 @@ function webpackConfigEpilot360ReactApp(opts) {
|
|
|
54
54
|
const legacyEntrypoint = path.resolve(
|
|
55
55
|
process.cwd(),
|
|
56
56
|
'src',
|
|
57
|
-
`${opts.orgName}-${opts.projectName}.
|
|
57
|
+
`${opts.orgName}-${opts.projectName}.ts`
|
|
58
58
|
)
|
|
59
59
|
|
|
60
|
-
const fileExists = (path) =>
|
|
60
|
+
const fileExists = (path) => {
|
|
61
|
+
if (fs.existsSync(path)) return path
|
|
62
|
+
if (fs.existsSync(path + 'x')) return path + 'x'
|
|
63
|
+
return null
|
|
64
|
+
}
|
|
61
65
|
|
|
62
66
|
return {
|
|
63
67
|
mode: isProduction ? "production" : "development",
|
|
@@ -134,10 +138,9 @@ function webpackConfigEpilot360ReactApp(opts) {
|
|
|
134
138
|
],
|
|
135
139
|
},
|
|
136
140
|
optimization: {
|
|
141
|
+
minimize: isProduction,
|
|
137
142
|
minimizer: [
|
|
138
|
-
new
|
|
139
|
-
target: 'es2015'
|
|
140
|
-
})
|
|
143
|
+
new TerserPlugin()
|
|
141
144
|
]
|
|
142
145
|
},
|
|
143
146
|
devtool: "source-map",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot360/webpack-config-epilot360",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"description": "A webpack config for in-browser modules used with single-spa for Epilot360",
|
|
5
5
|
"main": "lib/webpack-config-epilot360-portal.js",
|
|
6
6
|
"directories": {
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
"fork-ts-checker-webpack-plugin": "^6.0.5",
|
|
18
18
|
"html-webpack-plugin": "^5.1.0",
|
|
19
19
|
"https-browserify": "^1.0.0",
|
|
20
|
-
"postcss": "^8.4.12",
|
|
21
20
|
"postcss-loader": "^6.2.1",
|
|
22
21
|
"standalone-single-spa-webpack-plugin": "^1.1.0",
|
|
23
22
|
"style-loader": "^2.0.0",
|
|
24
23
|
"systemjs-webpack-interop": "^2.3.2",
|
|
24
|
+
"terser-webpack-plugin": "^5.3.6",
|
|
25
25
|
"unused-files-webpack-plugin": "^3.4.0",
|
|
26
26
|
"webpack": "^5.50.0",
|
|
27
27
|
"webpack-bundle-analyzer": "^4.2.0",
|