angular/devkit

new webpack config is breaking 3rd party modules

phra opened this issue · 1 comments

phra commented

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Area

- [x] devkit
- [ ] schematics

Versions

  • node: 9.11.1
  • npm: 5.6.0

Repro steps

see stellar/js-stellar-base#128

The log given by the failure

see stellar/js-stellar-base#128

Desired functionality

nodejs shimmings are correctly configured.

Mention any other details that might be useful

nodejs shimmings were update in the latest version as:
https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts#L145

in the previous version, node shimmings were configured as:

  "node": {
    "fs": "empty",
    "global": true,
    "crypto": "empty",
    "tls": "empty",
    "net": "empty",
    "process": true,
    "module": false,
    "clearImmediate": false,
    "setImmediate": false
  },

for example, with node: false webpack trying to load crypto module without finding it because it's used by js-stellar-base package.

Hi, this issue is discussed in angular/angular-cli#9827 (comment) and angular/angular-cli#1548. We won't be adding back node-only packages to browser apps at this moment.