The website probably still works for you as it is already cached by the service worker. Try with another browser and it will not work.
firebase init
should be run in the project directory, not in the build directory.
After that, edit your firebase.json file to look like
{
"hosting": {
"public": "build/web",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
],
"headers": [
{
"source": "**",
"headers": [
{
"key": "Cache-Control",
"value": "no-cache"
}
]
}
]
}
}
"public": "build/web"
points to the directory where the files for deployment are.
Now you can do flutter build web
and firebase deploy
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…