Skip to content

Commit 22a8ecb

Browse files
committed
[C] Ensure wepback targets use browserslist
1 parent af20dba commit 22a8ecb

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

client/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@
186186
"packageManager": "yarn@4.6.0",
187187
"browserslist": [
188188
"defaults",
189-
"not IE 11"
189+
"not IE 11",
190+
"node >= 20"
190191
]
191192
}

client/webpack/config/base.config.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ import paths from "../helpers/paths";
77
const nameTemplate = environment.production ? "[name]-[contenthash]" : "[name]";
88

99
/* eslint-disable global-require */
10-
export default function buildWebpackConfiguration(target = "web") {
10+
export default function buildWebpackConfiguration(
11+
target = ["web", "browserslist"]
12+
) {
1113
function styleLoader() {
12-
if (target !== "web") return null;
14+
if (!target.includes("web")) return null;
1315
if (environment.isBuild) return MiniCssExtractPlugin.loader;
1416
return "style-loader";
1517
}

client/webpack/config/browser-base.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const compileEnv = require("../transforms/env");
88
import path from "path";
99
import merge from "webpack-merge";
1010

11-
const config = merge(baseConfig("web"), {
11+
const config = merge(baseConfig(), {
1212
entry: {
1313
"build/manifold-client-browser": ["./src/entry-browser.js"]
1414
},

client/webpack/config/ssr-base.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import environment from "../helpers/environment";
1111
import merge from "webpack-merge";
1212
const compileEnv = require("../transforms/env");
1313

14-
const config = merge(baseConfig("node"), {
14+
const config = merge(baseConfig(["node", "browserslist"]), {
1515
entry: {
1616
"ssr/manifold-client-ssr": ["./src/entry-ssr.js"]
1717
},

0 commit comments

Comments
 (0)