@epilot360/webpack-config-epilot360 2.5.3 → 2.5.6

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.
@@ -1,17 +1,23 @@
1
1
  /* eslint-disable @typescript-eslint/no-var-requires */
2
2
  const path = require("path");
3
3
  const fs = require("fs");
4
+ const webpack = require('webpack')
4
5
  const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
5
6
  const HtmlWebpackPlugin = require("html-webpack-plugin");
6
7
  const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin");
7
8
  const StandaloneSingleSpaPlugin = require("standalone-single-spa-webpack-plugin");
8
9
  const SystemJSPublicPathPlugin = require("systemjs-webpack-interop/SystemJSPublicPathWebpackPlugin");
9
- const EnvPrefixPlugin = require("webpack-env-prefix-plugin");
10
10
  const { ESBuildMinifyPlugin } = require('esbuild-loader')
11
-
12
11
  const resolveCwd = require('resolve-cwd');
13
12
 
14
- module.exports = webpackConfigEpilot360ReactApp;
13
+ process.env.NODE_ENV = process.env.NODE_ENV || 'development'
14
+
15
+ class EnvPrefixPlugin extends webpack.DefinePlugin {
16
+ constructor() {
17
+ const { 'process.env': { NODE_ENV, ...definitions } } = env.stringified;
18
+ super({ 'process.env': definitions })
19
+ }
20
+ }
15
21
 
16
22
  function webpackConfigEpilot360ReactApp(opts) {
17
23
  if (typeof opts !== "object") {
@@ -192,3 +198,5 @@ function webpackConfigEpilot360ReactApp(opts) {
192
198
  ],
193
199
  };
194
200
  }
201
+
202
+ module.exports = webpackConfigEpilot360ReactApp;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot360/webpack-config-epilot360",
3
- "version": "2.5.3",
3
+ "version": "2.5.6",
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": {