Skip to content

Commit

Permalink
fix(template-webpack): use new plugin syntax (#2990)
Browse files Browse the repository at this point in the history
  • Loading branch information
georgexu99 authored Oct 25, 2022
1 parent 4f222f4 commit 1472149
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/template/webpack/src/WebpackTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ class WebpackTemplate extends BaseTemplate {
const currentPJ = await fs.readJson(pjPath);
currentPJ.main = '.webpack/main';
currentPJ.config.forge.plugins = currentPJ.config.forge.plugins || [];
currentPJ.config.forge.plugins.push([
'@electron-forge/plugin-webpack',
{
currentPJ.config.forge.plugins.push({
name: '@electron-forge/plugin-webpack',
config: {
mainConfig: './webpack.main.config.js',
renderer: {
config: './webpack.renderer.config.js',
Expand All @@ -32,7 +32,7 @@ class WebpackTemplate extends BaseTemplate {
],
},
},
]);
});
await fs.writeJson(pjPath, currentPJ, {
spaces: 2,
});
Expand Down

0 comments on commit 1472149

Please sign in to comment.