This experimental project was generated with Angular CLI
version 9.0.0-next.5.
- Run npm start for a dev server
- Navigate to http://localhost:4200/
The app will automatically reload if you change any of the source files.
- Run npm run build to build the project
- Run npm run build:prod flag for a production build
The build artifacts will be stored in the dist/ directory.
- Change .firebaserc to point to your Firebase Hosting project
- Ensure that you are logged in to Firebase: npm run login
- Run npm run deploy
- Create a workspace without an app:
ng new --create-application=false angular-cli-static
- Create a minimal app:
ng g app --style=scss --minimal=true --routing=false --skip-tests=true static-html
- Comment out zone.js import in polyfills.ts
- In angular.json clear out "fileReplacements": []
- Remove app/, environments/
- Remove the following Angular dependencies from package.json's dependencies:
- @angular/animations
- @angular/forms
- Remove the following dependencies from package.json's devDependencies:
- codelyzer
- @angular/language-service
- Remove codelyzer from rulesDirectory and remove all of the Codelyzer rules from
the workspace tslint.json
- Remove directive-selector and component-selector rules
from your app's tslint.json
- Enable Deployment to Firebase
ng add @angular/fire
- Update your firebase.json to work with a static site rather than a SPA
"rewrites": [
{
"source": "/",
"destination": "/index.html"
}
]
- Add a 404.html and 404.css
- Update your project's assets list in angular.json to include the new files
"assets": [
"projects/static-html/src/favicon.ico",
"projects/static-html/src/404.html",
"projects/static-html/src/404.css",
"projects/static-html/src/assets"
],