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

Bootstrapper doesn't work with Electron Forge #93

Open
vilnytskyi opened this issue Jan 22, 2023 · 1 comment
Open

Bootstrapper doesn't work with Electron Forge #93

vilnytskyi opened this issue Jan 22, 2023 · 1 comment
Labels

Comments

@vilnytskyi
Copy link

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

  1. Create a new Electron app using Webpack+Typescript Electron Forge template:
npm init electron-app@latest aurelia-app -- --template=webpack-typescript
  1. Install aurelia bootstrapper package:
npm install aurelia-bootstrapper
  1. Import the installed package in src/renderer.ts:
import 'aurelia-bootstrapper'
  1. Run the application:
npm run start
@bigopon bigopon added the bug label Jan 31, 2023
@bigopon
Copy link
Member

bigopon commented Jan 31, 2023

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();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants