Skip to content

Add an option to set the build entry point instead of forcing .webpack/main. #2770

Closed

Description

@Danzo7

Pre-flight checklist

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project uses.
  • I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Problem description

I think it would be a great feature if we add an option in forge configs to change the output entry point when using webpack, I try to do that using output option in webpack config but it's only work with the command start and when make it just throws an exception:
Error: Electron Forge is configured to use the Webpack plugin. The plugin expects the"main" entry point in "package.json" to be ".webpack/main" (where the plugin outputs the generated files). Instead, it is "build/main"

Proposed solution

  • Add output option in electron forge config.

Alternatives considered

  • Read package.json and use whatever main attribute value is.

Additional information

This will allow more customization.

Activity

  1. MarshallOfSound commented on Mar 21, 2022

    @MarshallOfSound
    Member

    I'm curious as to the actual use case of this, the output path shouldn't matter to your app at all

  2. Danzo7 commented on Mar 21, 2022

    @Danzo7
    Author

    @MarshallOfSound Well if u make the executable app the output location for your code will remain resources\app\.webpack and I think it better to not force it to be as for production it seems odd to have it like that.

  3. Danzo7 commented on Mar 23, 2022

    @Danzo7
    Author

    would you guys agree on that?
    An optional output or outputFolder option That takes a string and use it value to name the output directory, with keeping .webpack as default when it not set.

  4. Danzo7 commented on Apr 2, 2022

    @Danzo7
    Author

    As there is no reply I'm going to close this issue cause it does not seem very helpful, I forked webpack plugin and add that feature in this repo :
    Danzo7/electron-forge-webpack

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions