forked from Arquisoft/sole_chat
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpatch.js
More file actions
32 lines (25 loc) · 906 Bytes
/
patch.js
File metadata and controls
32 lines (25 loc) · 906 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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;
}
var result = data.replace(/node: false/g, "node: {crypto: true, stream: true, fs: \'empty\'}");
fs.writeFile(f, result, "utf8", function (err) {
if (err){
return;
}
});
});
const f2 = "node_modules/@comunica/actor-init-sparql/lib/ActorInitSparql-browser.js";
fs.readFile(f2, "utf8", function (err,data) {
if (err) {
return;
}
var result = data.replace(/operation = (await this.mediatorOptimizeQueryOperation.mediate({ context, operation })).operation;/g, "//operation = (await this.mediatorOptimizeQueryOperation.mediate({ context, operation })).operation;");
fs.writeFile(f2, result, "utf8", function (err) {
if (err){
return;
}
});
});