Skip to content

Commit

Permalink
fix(lib): fixed github.io issue for deployed url
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyNahas committed Aug 25, 2020
1 parent 65a19dd commit 501ff1f
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 1 deletion.
73 changes: 73 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,66 @@
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {

"outputPath": "dist/browser",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": true,
"assets": [
"src/favicon.ico",
"src/assets",
{
"glob": "**/*",
"input": "./node_modules/svg-country-flags/svg",
"output": "/assets/svg-country-flags/svg"
}
],
"styles": [
"src/styles.scss",
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
"./node_modules/prismjs/themes/prism-okaidia.css"
],
"scripts": [
"./node_modules/prismjs/prism.js",
"./node_modules/prismjs/components/prism-typescript.min.js"
]
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
}
]
}
}
},
"build_ghpages": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"baseHref" : "/select-country/",
Expand Down Expand Up @@ -185,6 +245,19 @@
"configurations": {
"production": {}
}
},
"prerender_ghpages": {
"builder": "@nguniversal/builders:prerender",
"options": {
"browserTarget": "select-country:build_ghpages:production",
"serverTarget": "select-country:server:production",
"routes": [
"/"
]
},
"configurations": {
"production": {}
}
}
}
},
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"build:ssr": "ng build --prod && ng run select-country:server:production",
"serve:prerender": "cd dist/browser && http-server",
"postinstall": "ngcc",
"prerender": "ng run select-country:prerender"
"prerender": "ng run select-country:prerender",
"prerender:ghpages": "ng run select-country:prerender_ghpages"
},
"private": true,
"dependencies": {
Expand Down

0 comments on commit 501ff1f

Please sign in to comment.