Electron-forge: webpack: packaged app has incorrect reference to renderer index.js

Created on 17 Jul 2019  ยท  4Comments  ยท  Source: electron-userland/electron-forge

Preflight Checklist

  • [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.
  • [x] I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

  • Electron Forge Version:

    • 6.0.0-beta.42

  • Operating System:

    • all

  • Last Known Working Electron Forge version::

    • 6.0.0-beta.39

Please describe your issue:

When a Forge project using the Webpack template is packaged, the renderer file should be referenced as ../main_window/index.js, not /main_window/index.js.

Please provide either a failing minimal testcase (with a link to the code) or detailed steps to
reproduce your problem. Using electron-forge init is a good starting point, if that is not the
source of your problem.

On Linux:

$ npx --no-install --ignore-existing create-electron-app --template=webpack webpack-test
โœ” Initializing Project Directory
โœ” Initializing Git Repository
โœ” Copying Starter Files
โœ” Initializing NPM Module
โœ” Installing NPM Dependencies
โœ” Locating custom template: "webpack"
โœ” Installing Template Dependencies
โœ” Setting up Forge configuration
โœ” Setting up webpack configuration
$ cd my-new-app
$ npm run package
โœ” Checking your system
โœ” Compiling Main Process Code
โœ” Compiling Renderer Template
โœ” Preparing to Package Application for arch: x64
โœ” Preparing native dependencies
โœ” Packaging Application
$ out/my-new-app-linux-x64/my-new-app

screenshot of error in package

_Please note: this bug is confirmed. Any comment that says anything to the effect of "I also have this problem" will be minimized._

Bug Help Wanted

Most helpful comment

The path for the index.js seems to be correct in the 6.0.0-beta.43 but some css I am importing in the renderer.js are not being loaded now.

import $ from 'jquery';
import '@progress/kendo-ui';
import '@progress/kendo-theme-bootstrap';
import './index.css';

console.log('๐Ÿ‘‹ This message is being logged by "renderer.js", included via webpack');

image

image

The packaged app is looking at the renderer/main_window/ for these 2 css files, but they are actually located in the renderer/ folder.

All 4 comments

My fix in #1021 was incorrect.

I'll do a new PR.

Much appreciated!

1035 should be at the right place this time

The path for the index.js seems to be correct in the 6.0.0-beta.43 but some css I am importing in the renderer.js are not being loaded now.

import $ from 'jquery';
import '@progress/kendo-ui';
import '@progress/kendo-theme-bootstrap';
import './index.css';

console.log('๐Ÿ‘‹ This message is being logged by "renderer.js", included via webpack');

image

image

The packaged app is looking at the renderer/main_window/ for these 2 css files, but they are actually located in the renderer/ folder.

Was this page helpful?
0 / 5 - 0 ratings