Skip to content

Commit

Permalink
chore(deps): update webpack conf for glob 9.x
Browse files Browse the repository at this point in the history
  • Loading branch information
wiwski committed Mar 6, 2023
1 parent 19526f9 commit 7ebf149
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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: {
Expand Down

0 comments on commit 7ebf149

Please sign in to comment.