forge
forge copied to clipboard
feat(plugin): add setup to rspack plugin
- [x] I have read the contribution documentation for this project.
- [x] I agree to follow the code of conduct that this project follows, as appropriate.
- [ ] The changes are appropriately documented (if applicable).
- [ ] The changes have sufficient test coverage (if applicable).
- [ ] The testsuite passes successfully on my local machine (if applicable).
Summarize your changes:
The idea of this PR is to bring a new plugin allowing us to use the rspack as a possible bundler for Electron with forge tooling. By the fact that rspack
has a similar API related for Webpack, it follows the same approach. As the example below:
{
name: '@electron-forge/plugin-rspack',
config: {
mainConfig: './rspack.main.config.js',
renderer: {
config: './rspack.renderer.config.js',
entryPoints: [{
name: 'main_window',
html: './src/renderer/index.html',
js: './src/renderer/index.js',
preload: {
js: './src/preload.js'
}
}]
}
}
}
Hi @noghartt. CI failed, can you fix it?
Hi @noghartt. CI failed, can you fix it?
ofc, i'll need to write more tests for these cases and fix the ci
it seems that the types aren't well matched yet
It looks like a log of this code is duplicated, I wonder if there is a way we can write this plugin so it uses the webpack plugin impl but swaps out the underlying webpack calls for rspack to avoid massive duplication