aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/angular-cli-patch.js
diff options
context:
space:
mode:
authorWilliam Lahti <wilahti@gmail.com>2018-06-28 06:53:04 -0700
committerChocobozzz <me@florianbigard.com>2018-06-28 15:53:04 +0200
commit3ea9a1c311c3e3c55fb95560d4dd99a77c52df4a (patch)
treed2c409d6c5f247cf0b1fc2d76bd1370fddd3fa3c /client/angular-cli-patch.js
parent9e01e51099c2949036f29d01f7305dff4d2b8748 (diff)
downloadPeerTube-3ea9a1c311c3e3c55fb95560d4dd99a77c52df4a.tar.gz
PeerTube-3ea9a1c311c3e3c55fb95560d4dd99a77c52df4a.tar.zst
PeerTube-3ea9a1c311c3e3c55fb95560d4dd99a77c52df4a.zip
Replace angular-cli patch with something less risky (#742)
* Replace angular-cli patch with something less risky * path.join() is needed, provide a naive implementation * technically, webpack provided a polyfill for Buffer, we should too * process polyfill matches webpack; peertube depends on nextTick * polyfill for path to match webpack * http/https polyfills as per webpack
Diffstat (limited to 'client/angular-cli-patch.js')
-rw-r--r--client/angular-cli-patch.js15
1 files changed, 0 insertions, 15 deletions
diff --git a/client/angular-cli-patch.js b/client/angular-cli-patch.js
deleted file mode 100644
index 0829631c2..000000000
--- a/client/angular-cli-patch.js
+++ /dev/null
@@ -1,15 +0,0 @@
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});