From 7ebf149496ab0bb773ffee4d91fe4185f00b0540 Mon Sep 17 00:00:00 2001 From: witold Date: Mon, 6 Mar 2023 11:28:25 +0100 Subject: [PATCH] chore(deps): update webpack conf for glob 9.x --- webpack.config.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 490de1388..216bcf0c2 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,6 +1,6 @@ import "dotenv/config"; import path from "path"; -import glob from "glob"; +import { globSync } from "glob"; import globAll from "glob-all"; import { fileURLToPath } from "url"; import { dirname } from "path"; @@ -40,14 +40,16 @@ export default { ], ...Object.assign( {}, - ...glob.sync("./**/assets/js/pages/*.js").map((file) => { - return { - [file.split("/").pop().split(".").shift()]: { - import: file, - filename: "./pages/[name].js", - }, - }; - }) + ...globSync("./**/assets/js/pages/*.js", { dotRelative: true }).map( + (file) => { + return { + [file.split("/").pop().split(".").shift()]: { + import: file, + filename: "./pages/[name].js", + }, + }; + } + ) ), }, output: {