aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/angular-cli-patch.js
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-05-15 17:08:31 +0200
committerChocobozzz <me@florianbigard.com>2018-05-16 09:42:56 +0200
commit17c49e60b367868c80f44b9921793dc3a2d9adaa (patch)
treee17c8d85b7a4301a58a907b6053660c5a6a6f87b /client/angular-cli-patch.js
parent4935a6a1fd38a31c42d1ae8b1e03aa40c475a89c (diff)
downloadPeerTube-17c49e60b367868c80f44b9921793dc3a2d9adaa.tar.gz
PeerTube-17c49e60b367868c80f44b9921793dc3a2d9adaa.tar.zst
PeerTube-17c49e60b367868c80f44b9921793dc3a2d9adaa.zip
Add patch for angular cli 6
Diffstat (limited to 'client/angular-cli-patch.js')
-rw-r--r--client/angular-cli-patch.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/client/angular-cli-patch.js b/client/angular-cli-patch.js
new file mode 100644
index 000000000..0829631c2
--- /dev/null
+++ b/client/angular-cli-patch.js
@@ -0,0 +1,15 @@
1// Remove patch when https://github.com/angular/angular-cli/issues/10681#issuecomment-389160125 is closed
2
3const fs = require('fs');
4const f = 'node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/browser.js';
5
6fs.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});