I'm currently working on a project using Nuxt.js to generate static content, which involves utilizing JavaScript for tasks such as navigation and form functionality.
Everything works smoothly when running the page with npm run dev.
However, after exporting the content with npm run build && npm run generate and deploying it to my server (CDN specifically requested by the user, in this case Google Cloud Storage), I encounter an issue where accessing the page without the index.html suffix works perfectly fine.
For example:
Visiting functions correctly
but
Accessing doesn't work properly.
The page displays CSS and DOM elements, but the JavaScript functionalities are not operational. In the Google Chrome Dev-Tools, I noticed that although the JavaScript files appear to be loaded in both cases, they are not executed under the second scenario. Attached screenshots show similarities between the two situations.
https://i.stack.imgur.com/DpEFg.png
My Nuxt configuration is quite minimal in terms of render and build settings, with only resourceHints disabled. I suspect that the issue might be related to the router's handling of accepting only folders containing the index.html file. The router paths are dynamically generated through nuxtLinks.
Any suggestions or insights would be greatly appreciated?