I struggle on firebase functions does not load the static .js files, so my index.html stays white. Replacing the cra-index.html with a "non-js" index.html with a simple h1 works fine. Locally, the index.html with javascript is loaded as well!
In my firebase functions index.js i used:
app.use(express.static("client/build/"));
due to the fact that a "non-js" index.html is served fine by:
app.get("/", (req, res) => {
res.sendFile("index.html");
});
this cant be the problem.
My index.html js-refs looks like this:
<script src="static/js/2.1ea6fe96.chunk.js"></script>
and my folderstructure looks like this: folderstructure
Can someone help me out? I am 100% sure that i made a mistake in referencing the .js files in the index.html but again, emulating the function by "firebase serve" locally works fine. Does firebase functions require a special style of defining the paths? Someone struggled on this too and can save some of my time?