Add patch for angular cli 6
This commit is contained in:
parent
4935a6a1fd
commit
17c49e60b3
|
@ -0,0 +1,15 @@
|
||||||
|
// Remove patch when https://github.com/angular/angular-cli/issues/10681#issuecomment-389160125 is closed
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
var result = data.replace(/node: false/g, 'node: { global: true, crypto: "empty", fs: "empty", process: true, module: false, clearImmediate: false, setImmediate: false }');
|
||||||
|
|
||||||
|
fs.writeFile(f, result, 'utf8', function (err) {
|
||||||
|
if (err) return console.log(err);
|
||||||
|
});
|
||||||
|
});
|
|
@ -11,6 +11,7 @@
|
||||||
"build": {
|
"build": {
|
||||||
"builder": "@angular-devkit/build-angular:browser",
|
"builder": "@angular-devkit/build-angular:browser",
|
||||||
"options": {
|
"options": {
|
||||||
|
"deployUrl": "client/",
|
||||||
"outputPath": "dist",
|
"outputPath": "dist",
|
||||||
"index": "src/index.html",
|
"index": "src/index.html",
|
||||||
"main": "src/main.ts",
|
"main": "src/main.ts",
|
||||||
|
@ -41,7 +42,7 @@
|
||||||
"extractLicenses": true,
|
"extractLicenses": true,
|
||||||
"vendorChunk": false,
|
"vendorChunk": false,
|
||||||
"buildOptimizer": true,
|
"buildOptimizer": true,
|
||||||
"serviceWorker": true,
|
"serviceWorker": false,
|
||||||
"ngswConfigPath": "/src/ngsw-config.json",
|
"ngswConfigPath": "/src/ngsw-config.json",
|
||||||
"fileReplacements": [
|
"fileReplacements": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
"webpack": "webpack",
|
"webpack": "webpack",
|
||||||
"tslint": "tslint",
|
"tslint": "tslint",
|
||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"postinstall": "npm rebuild node-sass",
|
"postinstall": "npm rebuild node-sass && node angular-cli-patch.js",
|
||||||
"webpack-bundle-analyzer": "webpack-bundle-analyzer"
|
"webpack-bundle-analyzer": "webpack-bundle-analyzer"
|
||||||
},
|
},
|
||||||
"license": "GPLv3",
|
"license": "GPLv3",
|
||||||
|
|
Loading…
Reference in New Issue