Deploy Ionic onto Netlify
- Site Configuration:
- Runtime: Not Set
- Build Command:
ionic build --prod
- Publish Directory:
www/
- install the
ionic cli
so it installs when running the buildnpm install --save-dev @ionic/cli
Page not Found
- [Support Guide] I’ve deployed my site but I still see “Page not found” - Support / Support Guides - Netlify Support Forums
- update angular.json file, where it copies over the assets:
"assets": [
{
"glob": "**/*",
"input": "src/assets",
"output": "assets"
},
{
"glob": "**/*.svg",
"input": "node_modules/ionicons/dist/ionicons/svg",
"output": "./svg"
},
"src/_redirects"
],
- create a
_redirects
file in thesrc
folder with the following content:
/* /index.html 200
📇 Additional Metadata
- 🗂 Type::#type/note
- 🏷️ Tags::
- 📡 Status::#status/🌲