Skip to content

Commit

Permalink
Allow prerender for all showcase routes and support for SSR/SSG (#156)
Browse files Browse the repository at this point in the history
* update to browser-esbuild

* upgrade to application

* bump deps

* ng update changed tsconfig

* Fix package version

* update deploy path

* fix lockfile

* Integrate ssr (#157)

* Enable SSR with migration script

* Add zone.js to polyfills

* Make Map component SSR compatible

* Make "Scroll demo into view" client only

* afterNextRender in layout-toolbar-menu

* afterNextRender in control.component.ts - fixes terrain example

* Lint - Update projects/showcase/src/app/app.config.ts

Co-authored-by: Harel M <harel.mazor@gmail.com>

* use withFetch to fix Error retrieving icon

* add custom loader for svg, fix loading icons on server

* fix loading map for ssr app by removing base-href

* detach portal in browser only

* remove polyfills

* replace window functions

* create popup in browser only with afterNextRender

* cleanup unused lifecycle hooks, remove control only in browser

* prerender with routes file

* Update projects/showcase/src/app/demo/examples/live-update-feature.component.ts

---------

Co-authored-by: Harel M <harel.mazor@gmail.com>
Co-authored-by: Marc Stammerjohann <8985933+marcjulian@users.noreply.github.com>

* Small changes to docs

* Fix test due to change in life cycle

* Added  more routes

* ignore problematic routes

* Add ignore to another test

* Allow prerender for all routes (46)

* Fix live update of image source

* Simplify code a bit

* fix multiple selectors for clear search button

---------

Co-authored-by: Harel M <harel.mazor@gmail.com>
Co-authored-by: Marc Stammerjohann <8985933+marcjulian@users.noreply.github.com>
  • Loading branch information
3 people authored Apr 9, 2024
1 parent c1c6cae commit 239e971
Show file tree
Hide file tree
Showing 28 changed files with 3,270 additions and 3,861 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ jobs:
uses: JamesIves/github-pages-deploy-action@4.1.4
with:
branch: gh-pages
folder: dist/showcase/
folder: dist/showcase/browser/
23 changes: 14 additions & 9 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"schematics": {},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"builder": "@angular-devkit/build-angular:application",
"options": {
"allowedCommonJsDependencies": [
"@mapbox/mapbox-sdk",
Expand All @@ -59,16 +59,24 @@
"aot": true,
"outputPath": "dist/showcase",
"index": "projects/showcase/src/index.html",
"main": "projects/showcase/src/main.ts",
"polyfills": "projects/showcase/src/polyfills.ts",
"browser": "projects/showcase/src/main.ts",
"polyfills": ["zone.js"],
"tsConfig": "projects/showcase/tsconfig.app.json",
"assets": [
"projects/showcase/src/favicon.ico",
"projects/showcase/src/assets",
"projects/showcase/src/app/demo/examples"
],
"styles": ["projects/showcase/src/styles.css"],
"scripts": []
"scripts": [],
"server": "projects/showcase/src/main.server.ts",
"prerender": true,
"ssr": {
"entry": "projects/showcase/server.ts"
},
"loader": {
".svg": "text"
}
},
"configurations": {
"production": {
Expand All @@ -86,12 +94,9 @@
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"sourceMap": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
"extractLicenses": true
}
}
},
Expand Down
Loading

0 comments on commit 239e971

Please sign in to comment.