Skip to content

Commit

Permalink
Merge pull request #39 from Schulzjo/refactor_getEntryObject_function
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-yin authored Nov 5, 2023
2 parents 5c325bd + 4bd85d0 commit 091b922
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ const WebpackAssetsManifest = require("webpack-assets-manifest");

const getEntryObject = () => {
const entries = {};
glob.sync(Path.join(__dirname, "../src/application/*.js")).forEach((path) => {
const name = Path.basename(path, ".js");
entries[name] = path;
glob.sync(Path.join(__dirname, "../src/application/*.{js}")).forEach((path) => {

const name = Path.basename(path);
const extension = Path.extname(path);
const entryName = name.replace(extension, '');

entries[entryName] = path;
});
return entries;
};
Expand Down

0 comments on commit 091b922

Please sign in to comment.