@epilot360/webpack-config-epilot360 1.3.15 → 2.1.2

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("babel-loader", { paths: [__dirname] }),
62
+ loader: require.resolve("esbuild-loader", { paths: [__dirname] }),
62
63
  options: {
63
- plugins: [
64
- ["lodash"],
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,25 @@ 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/, /src\/assets\/dashboard/],
94
+ exclude: [
95
+ /node_modules/,
96
+ /src\/assets\/ckeditor/,
97
+ /src\/assets\/dashboard/,
98
+ ],
99
+ include: [
100
+ /node_modules\/jsoneditor\/dist\/img/,
101
+ ],
92
102
  type: "asset/resource",
93
103
  },
94
104
  {
@@ -96,8 +106,19 @@ function webpackConfigEpilot360ReactApp(opts) {
96
106
  exclude: /node_modules/,
97
107
  type: "asset/source",
98
108
  },
109
+ {
110
+ test: /\.svg$/i,
111
+ loader: 'file-loader',
112
+ },
99
113
  ],
100
114
  },
115
+ optimization: {
116
+ minimizer: [
117
+ new ESBuildMinifyPlugin({
118
+ target: 'es2015'
119
+ })
120
+ ]
121
+ },
101
122
  devtool: "source-map",
102
123
  devServer: {
103
124
  compress: true,
@@ -125,7 +146,7 @@ function webpackConfigEpilot360ReactApp(opts) {
125
146
  HtmlWebpackPlugin,
126
147
  ...opts.standaloneOptions,
127
148
  }),
128
- opts.webpackConfigEnv && opts.webpackConfigEnv.analyze
149
+ isProduction || (opts.webpackConfigEnv && opts.webpackConfigEnv.analyze)
129
150
  ? false
130
151
  : new ForkTsCheckerWebpackPlugin({
131
152
  typescript: {
@@ -147,6 +168,7 @@ function webpackConfigEpilot360ReactApp(opts) {
147
168
  "react-dom",
148
169
  "axios",
149
170
  "lodash",
171
+ "js-yaml",
150
172
  "@epilot/base-elements",
151
173
  "@epilot/base-modules",
152
174
  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.15",
3
+ "version": "2.1.2",
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,10 +11,9 @@
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.18.0",
16
+ "file-loader": "^6.2.0",
18
17
  "fork-ts-checker-webpack-plugin": "^6.0.5",
19
18
  "html-webpack-plugin": "^5.1.0",
20
19
  "https-browserify": "^1.0.0",