Skip to content

Commit

Permalink
Revert "Remove monkeypatch"
Browse files Browse the repository at this point in the history
This reverts commit 1d454e3.
  • Loading branch information
pimotte committed Nov 28, 2018
1 parent 1d454e3 commit aba4786
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -8,7 +8,8 @@
"build": "ng build",
"test": "ng test --watch=false",
"lint": "ng lint",
"e2e": "ng e2e"
"e2e": "ng e2e",
"postinstall": "node patch.js"
},
"private": true,
"dependencies": {
Expand Down
13 changes: 13 additions & 0 deletions patch.js
@@ -0,0 +1,13 @@
const fs = require('fs');
const f = 'node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/browser.js';

fs.readFile(f, 'utf8', function (err,data) {
if (err) {
return console.log(err);
}
var result = data.replace(/node: false/g, 'node: {crypto: true, stream: true}');

fs.writeFile(f, result, 'utf8', function (err) {
if (err) return console.log(err);
});
});

0 comments on commit aba4786

Please sign in to comment.