Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

noghartt
Copy link

@noghartt noghartt commented Dec 23, 2023

  • 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
Copy link
Member

BlackHole1 commented Dec 25, 2023

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

@noghartt
Copy link
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
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

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.

None yet

3 participants