Add patch to webpack postinstall.
This commit is contained in:
parent
fbdfa54d9b
commit
ac9a6795a7
20073
package-lock.json
generated
20073
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -7,7 +7,8 @@
|
||||
"build": "ng build",
|
||||
"test": "ng test",
|
||||
"lint": "ng lint",
|
||||
"e2e": "ng e2e"
|
||||
"e2e": "ng e2e",
|
||||
"postinstall": "node patch-webpack.js"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
@ -49,8 +50,8 @@
|
||||
"@types/datatables.net": "^1.10.19",
|
||||
"@types/jasmine": "~3.5.0",
|
||||
"@types/jasminewd2": "~2.0.3",
|
||||
"@types/node": "^12.19.14",
|
||||
"@types/jquery": "^3.5.4",
|
||||
"@types/node": "^12.19.14",
|
||||
"codelyzer": "^6.0.0",
|
||||
"jasmine-core": "~3.6.0",
|
||||
"jasmine-spec-reporter": "~5.0.0",
|
||||
@ -64,6 +65,5 @@
|
||||
"ts-node": "~8.3.0",
|
||||
"tslint": "~6.1.0",
|
||||
"typescript": "~4.0.2"
|
||||
},
|
||||
"author": "Spencer Ofwiti <maxspencer56@gmail.com>"
|
||||
}
|
||||
}
|
||||
|
13
patch-webpack.js
Normal file
13
patch-webpack.js
Normal file
@ -0,0 +1,13 @@
|
||||
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 console.log(err);
|
||||
}
|
||||
let result = data.replace(/node: false/g, "node: {crypto: true, stream: true, fs: 'empty', net: 'empty'}");
|
||||
|
||||
fs.writeFile(f, result, 'utf8', function (err) {
|
||||
if (err) return console.log(err);
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue
Block a user