Last active
October 15, 2025 02:48
-
-
Save niespodd/1fa82da6f8c901d1c33d2fcbb762947d to your computer and use it in GitHub Desktop.
Revisions
-
niespodd revised this gist
Jan 24, 2021 . No changes.There are no files selected for viewing
-
niespodd revised this gist
Jan 24, 2021 . 1 changed file with 18 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,20 @@ // Angular >= 11 const fs = require('fs') const f = 'node_modules/@angular-devkit/build-angular/src/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: "empty"}') fs.writeFile(f, result, 'utf8', function(err) { if (err) return console.log(err) }) }); // ---- // For Angular <11 const fs = require('fs'); const f = 'node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/browser.js'; @@ -11,3 +28,4 @@ fs.readFile(f, 'utf8', function (err,data) { if (err) return console.log(err); }); }); // ---- -
niespodd revised this gist
May 6, 2018 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ {... "scripts": { "postinstall": "node patch.js", ... } } -
niespodd created this gist
May 6, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -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); }); });