@stanlemon/webdev 0.1.200 → 0.1.201

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/webpack.config.js +12 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stanlemon/webdev",
3
- "version": "0.1.200",
3
+ "version": "0.1.201",
4
4
  "description": "My typical web development setup, but without all the copy and paste.",
5
5
  "keywords": [
6
6
  "webpack",
package/webpack.config.js CHANGED
@@ -33,15 +33,18 @@ const WEBDEV_PROXY = process.env.WEBDEV_PROXY ?? "";
33
33
  const WEBPACK_PUBLIC_PATH = process.env.WEBPACK_PUBLIC_PATH ?? "/";
34
34
  const NODE_ENV = process.env.NODE_ENV ?? "development";
35
35
 
36
- const proxy = {};
37
- WEBDEV_PROXY.split(";").forEach((entry) => {
38
- if (entry.indexOf("@") === -1) {
39
- return;
40
- }
41
- const path = entry.substring(0, entry.indexOf("@"));
42
- const host = entry.substring(entry.indexOf("@") + 1);
43
- proxy[path] = host;
44
- });
36
+ const proxy = WEBDEV_PROXY.split(";")
37
+ .map((entry) => {
38
+ if (entry.indexOf("@") === -1) {
39
+ return null;
40
+ }
41
+ const path = entry.substring(0, entry.indexOf("@"));
42
+ const host = entry.substring(entry.indexOf("@") + 1);
43
+
44
+ return { context: [path], target: host };
45
+ })
46
+ // Remove any nulls
47
+ .filter((e) => e !== null);
45
48
 
46
49
  const isDevelopment = NODE_ENV !== "production";
47
50
 
@@ -100,7 +103,6 @@ module.exports = {
100
103
  loader: "babel-loader",
101
104
  options: {
102
105
  ...babelOptions,
103
- plugins: [isDevelopment && "react-refresh/babel"].filter(Boolean),
104
106
  },
105
107
  },
106
108
  resolve: {