Skip to content

Commit

Permalink
move manifestPlugin out of const, declare in plugins, re #11670
Browse files Browse the repository at this point in the history
  • Loading branch information
whatisgalen committed Feb 13, 2025
1 parent 969dafa commit 3463107
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 26 deletions.
24 changes: 11 additions & 13 deletions arches/install/arches-templates/webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,6 @@ module.exports = () => {
PROJECT_RELATIVE_NODE_MODULES_PATH = Path.resolve(APP_ROOT, '..', 'node_modules');
}

const manifestPlugin = new WebpackManifestPlugin({
fileName: 'manifest.json',
publicPath: global.STATIC_URL,
generate: (seed, files) => {
const manifest = {};
files.forEach(file => {
manifest[file.name] = file.path;
});
return manifest;
},
});

// END workaround for handling node_modules paths in arches-core vs projects
// BEGIN create entry point configurations

Expand Down Expand Up @@ -308,7 +296,17 @@ module.exports = () => {
filename: 'webpack-stats.json'
}),
new VueLoaderPlugin(),
manifestPlugin,
new WebpackManifestPlugin({
fileName: 'manifest.json',
publicPath: global.STATIC_URL,
generate: (seed, files) => {
const manifest = {};
files.forEach(file => {
manifest[file.name] = file.path;
});
return manifest;
},
}),
],
resolveLoader: {
alias: {
Expand Down
24 changes: 11 additions & 13 deletions webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,6 @@ module.exports = () => {
PROJECT_RELATIVE_NODE_MODULES_PATH = Path.resolve(APP_ROOT, '..', 'node_modules');
}

const manifestPlugin = new WebpackManifestPlugin({
fileName: 'manifest.json',
publicPath: global.STATIC_URL,
generate: (seed, files) => {
const manifest = {};
files.forEach(file => {
manifest[file.name] = file.path;
});
return manifest;
},
});

// END workaround for handling node_modules paths in arches-core vs projects
// BEGIN create entry point configurations

Expand Down Expand Up @@ -308,7 +296,17 @@ module.exports = () => {
filename: 'webpack-stats.json'
}),
new VueLoaderPlugin(),
manifestPlugin,
new WebpackManifestPlugin({
fileName: 'manifest.json',
publicPath: global.STATIC_URL,
generate: (seed, files) => {
const manifest = {};
files.forEach(file => {
manifest[file.name] = file.path;
});
return manifest;
},
}),
],
resolveLoader: {
alias: {
Expand Down

0 comments on commit 3463107

Please sign in to comment.