diff options
author | Chocobozzz <me@florianbigard.com> | 2018-05-15 17:08:31 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-05-16 09:42:56 +0200 |
commit | 17c49e60b367868c80f44b9921793dc3a2d9adaa (patch) | |
tree | e17c8d85b7a4301a58a907b6053660c5a6a6f87b /client/angular-cli-patch.js | |
parent | 4935a6a1fd38a31c42d1ae8b1e03aa40c475a89c (diff) | |
download | PeerTube-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.js | 15 |
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 | |||
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 | }); | ||