0๐
โ
you firebase.json should look like this:
hosting": {
"public": "dist",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
},
Run firebase deploy --only hosting
and it should be good. Source here
Make sure your output for that command looks something like this:
=== Deploying to 'your-project-name'...
i deploying hosting
i hosting[zero-to-prod-test]: beginning deploy...
i hosting[zero-to-prod-test]: found 16 files in public/build <---- THIS TELLS YOU IF THE FILES ARE BEING COPIED
โ hosting[zero-to-prod-test]: file upload complete
i hosting[zero-to-prod-test]: finalizing version...
โ hosting[zero-to-prod-test]: version finalized
i hosting[zero-to-prod-test]: releasing new version...
โ hosting[zero-to-prod-test]: release complete
That way to can debbug is something is wrong on the data transfer.
On your case your index.html is pointing to dist/build.js
intead of /build.js
that is causing the problem, so it doesnt look like a firebase problem but a webpack problem. Check your assets generation process.
Source:stackexchange.com