bootstrapper
bootstrapper copied to clipboard
Bootstrapper doesn't work with Electron Forge
I'm submitting a bug report
-
Library Version: 2.4.0
-
Operating System: Windows 11
-
Node Version: 18.13.0
- NPM Version: 8.9.13
-
Webpack Version webpack 5.75.0
-
Browser: Electron 22.0.3
-
Language: TypeScript 4.5.5
Current behavior:
Bootstrapper tries to resolve aurelia-loader-webpack module from <projectRoot>\.webpack\renderer\native_modules but fails.
Expected/desired behavior: Bootstrapper should properly bootstrap Aurelia app after it's imported in renderer script.
Steps to reproduce
- Create a new Electron app using Webpack+Typescript Electron Forge template:
npm init electron-app@latest aurelia-app -- --template=webpack-typescript
- Install aurelia bootstrapper package:
npm install aurelia-bootstrapper
- Import the installed package in
src/renderer.ts:
import 'aurelia-bootstrapper'
- Run the application:
npm run start
If bootstrapper is causing issues, one can try to temporarily work around it by bootstrapping the application oneself.
// main.js
import { Aurelia } from 'aurelia-framework';
export function startApplication() {
const au = new Aurelia();
au.use
.plugin(...)
.globalResources(...)
.start()
.then(() => au.setRoot(...))
}
startApplication();