@epilot360/webpack-config-epilot360 1.3.12 → 2.0.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.
|
@@ -6,7 +6,7 @@ const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin");
|
|
|
6
6
|
const StandaloneSingleSpaPlugin = require("standalone-single-spa-webpack-plugin");
|
|
7
7
|
const SystemJSPublicPathPlugin = require("systemjs-webpack-interop/SystemJSPublicPathWebpackPlugin");
|
|
8
8
|
const EnvPrefixPlugin = require("webpack-env-prefix-plugin");
|
|
9
|
-
const
|
|
9
|
+
const { ESBuildMinifyPlugin } = require('esbuild-loader')
|
|
10
10
|
|
|
11
11
|
module.exports = webpackConfigEpilot360ReactApp;
|
|
12
12
|
|
|
@@ -59,15 +59,10 @@ function webpackConfigEpilot360ReactApp(opts) {
|
|
|
59
59
|
test: /\.(js|ts)x?$/,
|
|
60
60
|
exclude: /node_modules/,
|
|
61
61
|
use: {
|
|
62
|
-
loader: require.resolve("
|
|
62
|
+
loader: require.resolve("esbuild-loader", { paths: [__dirname] }),
|
|
63
63
|
options: {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
[
|
|
67
|
-
"babel-plugin-styled-components",
|
|
68
|
-
{ namespace: opts.projectName },
|
|
69
|
-
],
|
|
70
|
-
],
|
|
64
|
+
loader: 'tsx',
|
|
65
|
+
target: 'es2015',
|
|
71
66
|
},
|
|
72
67
|
},
|
|
73
68
|
},
|
|
@@ -85,11 +80,18 @@ function webpackConfigEpilot360ReactApp(opts) {
|
|
|
85
80
|
modules: false,
|
|
86
81
|
},
|
|
87
82
|
},
|
|
83
|
+
{
|
|
84
|
+
loader: 'esbuild-loader',
|
|
85
|
+
options: {
|
|
86
|
+
loader: 'css',
|
|
87
|
+
minify: true
|
|
88
|
+
}
|
|
89
|
+
}
|
|
88
90
|
],
|
|
89
91
|
},
|
|
90
92
|
{
|
|
91
93
|
test: /\.(bmp|png|svg|jpg|jpeg|gif|webp)$/i,
|
|
92
|
-
exclude: [/node_modules/, /src\/assets\/ckeditor/],
|
|
94
|
+
exclude: [/node_modules/, /src\/assets\/ckeditor/, /src\/assets\/dashboard/],
|
|
93
95
|
type: "asset/resource",
|
|
94
96
|
},
|
|
95
97
|
{
|
|
@@ -99,6 +101,13 @@ function webpackConfigEpilot360ReactApp(opts) {
|
|
|
99
101
|
},
|
|
100
102
|
],
|
|
101
103
|
},
|
|
104
|
+
optimization: {
|
|
105
|
+
minimizer: [
|
|
106
|
+
new ESBuildMinifyPlugin({
|
|
107
|
+
target: 'es2015'
|
|
108
|
+
})
|
|
109
|
+
]
|
|
110
|
+
},
|
|
102
111
|
devtool: "source-map",
|
|
103
112
|
devServer: {
|
|
104
113
|
compress: true,
|
|
@@ -113,7 +122,6 @@ function webpackConfigEpilot360ReactApp(opts) {
|
|
|
113
122
|
analyzerMode: webpackConfigEnv.analyze ? "server" : "disabled",
|
|
114
123
|
}),
|
|
115
124
|
new EnvPrefixPlugin(),
|
|
116
|
-
new LodashModuleReplacementPlugin(),
|
|
117
125
|
new SystemJSPublicPathPlugin({
|
|
118
126
|
systemjsModuleName: `@${opts.orgName}/${opts.projectName}`,
|
|
119
127
|
rootDirectoryLevel: opts.rootDirectoryLevel,
|
|
@@ -127,7 +135,7 @@ function webpackConfigEpilot360ReactApp(opts) {
|
|
|
127
135
|
HtmlWebpackPlugin,
|
|
128
136
|
...opts.standaloneOptions,
|
|
129
137
|
}),
|
|
130
|
-
opts.webpackConfigEnv && opts.webpackConfigEnv.analyze
|
|
138
|
+
isProduction || (opts.webpackConfigEnv && opts.webpackConfigEnv.analyze)
|
|
131
139
|
? false
|
|
132
140
|
: new ForkTsCheckerWebpackPlugin({
|
|
133
141
|
typescript: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot360/webpack-config-epilot360",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.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": {
|
|
@@ -11,14 +11,11 @@
|
|
|
11
11
|
],
|
|
12
12
|
"scripts": {},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"babel-loader": "^8.2.2",
|
|
15
|
-
"babel-plugin-lodash": "^3.3.4",
|
|
16
|
-
"babel-plugin-styled-components": "^1.13.2",
|
|
17
14
|
"css-loader": "^5.0.1",
|
|
15
|
+
"esbuild-loader": "^2.17.0",
|
|
18
16
|
"fork-ts-checker-webpack-plugin": "^6.0.5",
|
|
19
17
|
"html-webpack-plugin": "^5.1.0",
|
|
20
18
|
"https-browserify": "^1.0.0",
|
|
21
|
-
"lodash-webpack-plugin": "^0.11.6",
|
|
22
19
|
"standalone-single-spa-webpack-plugin": "^1.1.0",
|
|
23
20
|
"style-loader": "^2.0.0",
|
|
24
21
|
"systemjs-webpack-interop": "^2.3.2",
|