From 7b24050de92ff4c22f08983375f196270eb78491 Mon Sep 17 00:00:00 2001 From: Max Leiter Date: Wed, 1 Jun 2022 00:50:49 -0700 Subject: [PATCH] Attempt to fix webpack globs on windows --- webpack.config.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/webpack.config.ts b/webpack.config.ts index 55c33958..398a7cba 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -118,10 +118,12 @@ const config: webpack.Configuration = { new CopyPlugin({ patterns: [ { - from: path.resolve( - __dirname, - "node_modules/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff*" - ), + from: path + .resolve( + __dirname, + "node_modules/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff*" + ) + .replace(/\\/g, "/"), to: "fonts/[name][ext]", }, { @@ -129,7 +131,7 @@ const config: webpack.Configuration = { to: "js/[name][ext]", }, { - from: path.resolve(__dirname, "./client/*"), + from: path.resolve(__dirname, "./client/*").replace(/\\/g, "/"), to: "[name][ext]", globOptions: { ignore: ["**/index.html.tpl", "**/service-worker.js"], @@ -148,15 +150,15 @@ const config: webpack.Configuration = { }, }, { - from: path.resolve(__dirname, "./client/audio/*"), + from: path.resolve(__dirname, "./client/audio/*").replace(/\\/g, "/"), to: "audio/[name][ext]", }, { - from: path.resolve(__dirname, "./client/img/*"), + from: path.resolve(__dirname, "./client/img/*").replace(/\\/g, "/"), to: "img/[name][ext]", }, { - from: path.resolve(__dirname, "./client/themes/*"), + from: path.resolve(__dirname, "./client/themes/*").replace(/\\/g, "/"), to: "themes/[name][ext]", }, ],