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

fix(plugin-webpack): properly reference index.js in production #1021

Merged
merged 3 commits into from
Jul 15, 2019

Conversation

shimaore
Copy link
Contributor

@shimaore shimaore commented Jul 13, 2019

When building an executable using electron-forge make, setting publicPath as / leads (for example) to index.js being referenced as file:///main_window/index.js, which cannot be found. (The URL points to /main_window/index.js, which is incorrect. It should be ../main_window/index.js.)

When it is unset, the build runs properly and provides the correct URL. (This still works with electron-forge start as well with manual reloading.)

  • 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:

Removed the (apparently unnecessary) reference to publicPath.
Removed the reference to publicPath when building for production.

When building an executable using `electron-force make`, setting `publicPath` as `/` leads (for example) to `index.js` being referenced as `file:///main_window/index.js`, which cannot be found. (The URL points to `/main_window/index.js`, which is incorect. It should be `../main_window/index.js`.)

When it is unset, the build runs properly and provides the correct URL. (This still works with `electron-forge start` as well.)
@shimaore shimaore changed the title webpack plugin: properly references index.js fix: webpack plugin should properly reference index.js Jul 14, 2019
@shimaore shimaore changed the title fix: webpack plugin should properly reference index.js fix(plugin-webpack): properly reference index.js in production Jul 14, 2019
@malept malept merged commit d70ae5c into electron:master Jul 15, 2019
@malept
Copy link
Member

malept commented Jul 16, 2019

Hmmm. This change didn't actually make the reference ../main_window/index.js, it's still /main_window/index.js 😢

shimaore added a commit to shimaore/electron-forge that referenced this pull request Jul 17, 2019
This reverts improper PR#1021 and re-implements the changes I have in the JS (compiled) code at the right place.
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