@epilot360/webpack-config-epilot360 1.3.13 → 2.1.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,6 +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 { ESBuildMinifyPlugin } = require('esbuild-loader')
|
|
9
10
|
|
|
10
11
|
module.exports = webpackConfigEpilot360ReactApp;
|
|
11
12
|
|
|
@@ -58,15 +59,10 @@ function webpackConfigEpilot360ReactApp(opts) {
|
|
|
58
59
|
test: /\.(js|ts)x?$/,
|
|
59
60
|
exclude: /node_modules/,
|
|
60
61
|
use: {
|
|
61
|
-
loader: require.resolve("
|
|
62
|
+
loader: require.resolve("esbuild-loader", { paths: [__dirname] }),
|
|
62
63
|
options: {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
[
|
|
66
|
-
"babel-plugin-styled-components",
|
|
67
|
-
{ namespace: opts.projectName },
|
|
68
|
-
],
|
|
69
|
-
],
|
|
64
|
+
loader: 'tsx',
|
|
65
|
+
target: 'es2015',
|
|
70
66
|
},
|
|
71
67
|
},
|
|
72
68
|
},
|
|
@@ -84,11 +80,18 @@ function webpackConfigEpilot360ReactApp(opts) {
|
|
|
84
80
|
modules: false,
|
|
85
81
|
},
|
|
86
82
|
},
|
|
83
|
+
{
|
|
84
|
+
loader: 'esbuild-loader',
|
|
85
|
+
options: {
|
|
86
|
+
loader: 'css',
|
|
87
|
+
minify: true
|
|
88
|
+
}
|
|
89
|
+
}
|
|
87
90
|
],
|
|
88
91
|
},
|
|
89
92
|
{
|
|
90
93
|
test: /\.(bmp|png|svg|jpg|jpeg|gif|webp)$/i,
|
|
91
|
-
exclude: [/node_modules/, /src\/assets\/ckeditor/],
|
|
94
|
+
exclude: [/node_modules/, /src\/assets\/ckeditor/, /src\/assets\/dashboard/],
|
|
92
95
|
type: "asset/resource",
|
|
93
96
|
},
|
|
94
97
|
{
|
|
@@ -98,6 +101,13 @@ function webpackConfigEpilot360ReactApp(opts) {
|
|
|
98
101
|
},
|
|
99
102
|
],
|
|
100
103
|
},
|
|
104
|
+
optimization: {
|
|
105
|
+
minimizer: [
|
|
106
|
+
new ESBuildMinifyPlugin({
|
|
107
|
+
target: 'es2015'
|
|
108
|
+
})
|
|
109
|
+
]
|
|
110
|
+
},
|
|
101
111
|
devtool: "source-map",
|
|
102
112
|
devServer: {
|
|
103
113
|
compress: true,
|
|
@@ -125,7 +135,7 @@ function webpackConfigEpilot360ReactApp(opts) {
|
|
|
125
135
|
HtmlWebpackPlugin,
|
|
126
136
|
...opts.standaloneOptions,
|
|
127
137
|
}),
|
|
128
|
-
opts.webpackConfigEnv && opts.webpackConfigEnv.analyze
|
|
138
|
+
isProduction || (opts.webpackConfigEnv && opts.webpackConfigEnv.analyze)
|
|
129
139
|
? false
|
|
130
140
|
: new ForkTsCheckerWebpackPlugin({
|
|
131
141
|
typescript: {
|
|
@@ -147,6 +157,7 @@ function webpackConfigEpilot360ReactApp(opts) {
|
|
|
147
157
|
"react-dom",
|
|
148
158
|
"axios",
|
|
149
159
|
"lodash",
|
|
160
|
+
"js-yaml",
|
|
150
161
|
"@epilot/base-elements",
|
|
151
162
|
"@epilot/base-modules",
|
|
152
163
|
new RegExp(`^@epilot360/`), // all @epilot360/* packages will be treated as external
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot360/webpack-config-epilot360",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "2.1.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",
|