diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/angular-cli-patch.js | 15 | ||||
-rw-r--r-- | client/angular.json | 5 | ||||
-rw-r--r-- | client/package.json | 2 |
3 files changed, 19 insertions, 3 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 | }); | ||
diff --git a/client/angular.json b/client/angular.json index 4a03d7cfe..4f7f7e72b 100644 --- a/client/angular.json +++ b/client/angular.json | |||
@@ -11,6 +11,7 @@ | |||
11 | "build": { | 11 | "build": { |
12 | "builder": "@angular-devkit/build-angular:browser", | 12 | "builder": "@angular-devkit/build-angular:browser", |
13 | "options": { | 13 | "options": { |
14 | "deployUrl": "client/", | ||
14 | "outputPath": "dist", | 15 | "outputPath": "dist", |
15 | "index": "src/index.html", | 16 | "index": "src/index.html", |
16 | "main": "src/main.ts", | 17 | "main": "src/main.ts", |
@@ -41,7 +42,7 @@ | |||
41 | "extractLicenses": true, | 42 | "extractLicenses": true, |
42 | "vendorChunk": false, | 43 | "vendorChunk": false, |
43 | "buildOptimizer": true, | 44 | "buildOptimizer": true, |
44 | "serviceWorker": true, | 45 | "serviceWorker": false, |
45 | "ngswConfigPath": "/src/ngsw-config.json", | 46 | "ngswConfigPath": "/src/ngsw-config.json", |
46 | "fileReplacements": [ | 47 | "fileReplacements": [ |
47 | { | 48 | { |
@@ -136,4 +137,4 @@ | |||
136 | "prefix": "app" | 137 | "prefix": "app" |
137 | } | 138 | } |
138 | } | 139 | } |
139 | } \ No newline at end of file | 140 | } |
diff --git a/client/package.json b/client/package.json index cd975dd0b..58ce7f65d 100644 --- a/client/package.json +++ b/client/package.json | |||
@@ -17,7 +17,7 @@ | |||
17 | "webpack": "webpack", | 17 | "webpack": "webpack", |
18 | "tslint": "tslint", | 18 | "tslint": "tslint", |
19 | "ng": "ng", | 19 | "ng": "ng", |
20 | "postinstall": "npm rebuild node-sass", | 20 | "postinstall": "npm rebuild node-sass && node angular-cli-patch.js", |
21 | "webpack-bundle-analyzer": "webpack-bundle-analyzer" | 21 | "webpack-bundle-analyzer": "webpack-bundle-analyzer" |
22 | }, | 22 | }, |
23 | "license": "GPLv3", | 23 | "license": "GPLv3", |