Automatically jump to the highlighted thread
[oweals/peertube.git] / client / angular-cli-patch.js
1 // Remove patch when https://github.com/angular/angular-cli/issues/10681#issuecomment-389160125 is closed
2
3 const fs = require('fs');
4 const f = 'node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/browser.js';
5
6 fs.readFile(f, 'utf8', function (err,data) {
7   if (err) {
8     return console.log(err);
9   }
10   var result = data.replace(/node: false/g, 'node: { global: true, crypto: "empty", fs: "empty", process: true, module: false, clearImmediate: false, setImmediate: false }');
11
12   fs.writeFile(f, result, 'utf8', function (err) {
13     if (err) return console.log(err);
14   });
15 });