Kaffiend / electron-angular-ngrx

An Angular (6x) Electron seed featuring @angular/cli, @ngrx/platform, and Typescript. Complete with HMR workflow
MIT License
39 stars 10 forks source link

No native module support #7

Closed ruipimentel closed 6 years ago

ruipimentel commented 6 years ago

Reproduction steps:

  1. Clone and install this seed as described in the README.md.
  2. On app.component.ts, add the following require():
    const { ipcRenderer } = require('electron');

With gulp command, the following is displayed in red in Electron's console: Uncaught TypeError: fs.existsSync is not a function vendor.bundle.js:426

With ng test command, the following is displayed in red on the terminal: Error: Can't resolve 'fs' in '.../electron-angular-ngrx/node_modules/electron'

Kaffiend commented 6 years ago

Yes, I've solved this challenge, but I had to eject the underlying webpack and build from it to re-integrate HMR and Live reload workflows. I will finish the NGRX PR then create another for the native module support and updated workflow with the ejected cli until another solution either from the CLI team or otherwise presents itself.

Kaffiend commented 6 years ago

Native module support added in #6

ruipimentel commented 6 years ago

Thank you! I'll check this out ASAP :)