Skip to content

Commit

Permalink
fix(template-typescript-webpack): preload file to webpack config (#2936)
Browse files Browse the repository at this point in the history

Co-authored-by: Gregory Reburn <[email protected]>
Co-authored-by: Erick Zhao <[email protected]>
  • Loading branch information
3 people authored Sep 16, 2022
1 parent 5264607 commit cb1e560
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ class TypeScriptWebpackTemplate extends BaseTemplate {
html: './src/index.html',
js: './src/renderer.ts',
name: 'main_window',
preload: {
js: './src/preload.ts',
},
},
],
},
Expand Down Expand Up @@ -63,6 +66,9 @@ class TypeScriptWebpackTemplate extends BaseTemplate {
await this.copyTemplateFile(path.join(directory, 'src'), 'index.ts');

await this.copyTemplateFile(path.join(directory, 'src'), 'renderer.ts');

// Remove preload.js and replace with preload.ts
await fs.remove(filePath('preload.js'));
await this.copyTemplateFile(path.join(directory, 'src'), 'preload.ts');
});
}
Expand Down

0 comments on commit cb1e560

Please sign in to comment.