diff --git a/angular.json b/angular.json index 266edb7..f6d2af4 100644 --- a/angular.json +++ b/angular.json @@ -26,8 +26,13 @@ "assets": [ { "glob": "**/*", - "input": "src/assets", - "output": "assets" + "input": "src/assets/optimized", + "output": "assets/optimized" + }, + { + "glob": "**/*", + "input": "src/assets/logos", + "output": "assets/logos" }, { "glob": "**/*", @@ -108,8 +113,13 @@ "assets": [ { "glob": "**/*", - "input": "src/assets", - "output": "assets" + "input": "src/assets/optimized", + "output": "assets/optimized" + }, + { + "glob": "**/*", + "input": "src/assets/logos", + "output": "assets/logos" }, { "glob": "**/*", diff --git a/package.json b/package.json index 1ae918b..7d78b46 100644 --- a/package.json +++ b/package.json @@ -24,10 +24,11 @@ "check": "npm run build && npm run lint && npm run format:check && npm run version:check && npm run text:check", "fix": "npm run version:place && npm run lint:fix && npm run text:fix && npm run format", "------ BUILD": "", + "clean": "del-cli dist", "generate:static-files": "node scripts/generate-static-files.cjs", "generate:assets": "npm run generate:static-files", "compress:assets": "node scripts/compress-assets.cjs", - "build": "npm run generate:assets && ng build --configuration production && npm run compress:assets && node scripts/copy-static-root-files.cjs", + "build": "npm run clean && npm run generate:assets && ng build --configuration production && npm run compress:assets && node scripts/copy-static-root-files.cjs", "------ STARTUP": "", "test": "ng test", "dev": "npm run generate:assets && ng serve", diff --git a/src/app/app.config.ts b/src/app/app.config.ts index 2de7dd7..71c2a7b 100644 --- a/src/app/app.config.ts +++ b/src/app/app.config.ts @@ -1,7 +1,7 @@ import type { ApplicationConfig } from '@angular/core'; -import { importProvidersFrom, provideZoneChangeDetection } from '@angular/core'; +import { provideZoneChangeDetection } from '@angular/core'; import { provideRouter, withInMemoryScrolling } from '@angular/router'; -import { BrowserModule, provideClientHydration, withEventReplay } from '@angular/platform-browser'; +import { provideClientHydration, withEventReplay } from '@angular/platform-browser'; import { routes } from './app.routes'; @@ -16,6 +16,5 @@ export const appConfig: ApplicationConfig = { }), ), provideClientHydration(withEventReplay()), - importProvidersFrom(BrowserModule), ], }; diff --git a/src/app/app.routes.ts b/src/app/app.routes.ts index 8d83b3d..51fa04d 100644 --- a/src/app/app.routes.ts +++ b/src/app/app.routes.ts @@ -1,10 +1,17 @@ import type { Routes } from '@angular/router'; -import { HomeComponent } from './home/home.component'; -import { ImprintComponent } from './imprint/imprint.component'; - export const routes: Routes = [ - { path: '', component: HomeComponent, pathMatch: 'full' }, - { path: 'imprint', component: ImprintComponent, pathMatch: 'full' }, + { + path: '', + loadComponent: async () => + (await import('./home/home.component')).HomeComponent, + pathMatch: 'full', + }, + { + path: 'imprint', + loadComponent: async () => + (await import('./imprint/imprint.component')).ImprintComponent, + pathMatch: 'full', + }, { path: '**', redirectTo: '' }, ]; diff --git a/src/app/home/home.component.html b/src/app/home/home.component.html index 0a157c5..3b3d176 100644 --- a/src/app/home/home.component.html +++ b/src/app/home/home.component.html @@ -64,13 +64,28 @@ [title]="portraitHighlights.length > 1 ? 'Show next image' : 'Single image'" >