electron / electron/forge

Can't bootstrap Aurelia

Open
#3,146 3 comments 0 reactions 0 assignees View on GitHub
plugin/webpack
Dominant language
TypeScript
Stars
7.1k
Forks
641
Avg merge
3d 1h
Merged PRs (30d)
30

Description

### Pre-flight checklist

- [X] I have read the [contribution documentation](https://github.com/electron/forge/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [code of conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project uses.
- [X] I have searched the issue tracker for a bug that matches the one I want to file, without success.

### Electron Forge version

6.0.4

### Electron version

22.0.3

### Operating system

Windows 11 x64

### Last known working Electron Forge version

_No response_

### Expected behavior

The `aurelia-bootstrapper@latest` npm package should properly bootstrap Aurelia app in required conditions are met.

### Actual behavior

Aurelia Bootstrapper tries to resolve `aurelia-loader-webpack` module from `\.webpack\renderer\native_modules` but fails.

### Steps to reproduce

1. Create a new Electron app using `npm init electron-app@latest aurelia-app -- --template=webpack-typescript`
2. Open `src/index.ts` file and add `nodeIntegration: true, contextIsolation: false` to `webPreferences` config of `BrowserWindow`:
```
const mainWindow = new BrowserWindow({
height: 600,
width: 800,
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
preload: MAIN_WINDOW_PRELOAD_WEBPACK_ENTRY,
},
})
```
3. Install aurelia bootstrapper package:
```
npm install aurelia-bootstrapper
```
4. Import the installed package in `src/renderer.ts`:
```
import 'aurelia-bootstrapper'
```
5. Run the application:
```
npm run start
```

### Additional information

The following scenario works just fine when running development webpack bundle without Electron.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.