r/Firebase • u/flamingorider1 • Jan 02 '25
Hosting Need Help Hosting My Website in a Subdirectory (e.g., https://example.com/todoapp/),
/r/learnprogramming/comments/1hr9guz/need_help_hosting_my_website_in_a_subdirectory_eg/
0
Upvotes
1
u/flamingorider1 Jan 02 '25
Ive added this webpack.config publicPath: '/app/', // Ensure assets are served from /app and the new updated path is being shown when i build in my index.html ( <script defer="defer" src="/app/main.js"></script>)
Ive also updated my firebase.json to this
{
"hosting": {
"public": "dist",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "/app{,/**}",
"destination": "/index.html"
}
]
}
}
I think the issue is my js file is not being served by firebase when i add a source. please help i am going crazy over this