Skip to content

feat(plugin): add setup to rspack plugin - #3451

Open
noghartt wants to merge 2 commits into
electron:7.xfrom
noghartt:feat/rspack-plugin
Open

noghartt wants to merge 2 commits into
electron:7.xfrom
noghartt:feat/rspack-plugin

Conversation

@noghartt

@noghartt noghartt commented Dec 23, 2023

Copy link
Copy Markdown
  • I have read the contribution documentation for this project.
  • 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'
            }
          }]
        }
      }
    }

@noghartt
noghartt requested a review from a team as a code owner December 23, 2023 21:29
@BlackHole1

BlackHole1 commented Dec 25, 2023

Copy link
Copy Markdown
Member

Hi @noghartt. CI failed, can you fix it?

@noghartt

Copy link
Copy Markdown
Author

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

@MarshallOfSound

Copy link
Copy Markdown
Member

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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants