Curious: Redirect with slash at the end

I have a HTML element:

Error in the Browser:

When I try to copy the link into the browser, there is always a redirect with a slash at end:
http://localhost:2369/assets/index-bzlgkaq-.js / <—

Thanks for help, Joe

Ghost redirects all non-asset requests without a trailing slash to the url with a trailing slash. In this case the asset you’re linking to might not exist

Those URLs look like a react app built with vite, which changes them on every rebuild. Worth checking that they’re valid for sure!

It’s vue + vite.
A month ago, I tested whether the integration with VUE works. It worked.

I thought I would do it the same way.
I will check again exactly what the difference is…

As Cathy mentioned, every time you make changes to your app, the asset path will change. Assuming that’s the case, you either need to disable adding the hash to entrypoints in your vite config , or add a sync step in your vite build to update the asset link in the.

That’s not the reason. I copied all the dist files to ghost. So nothing will be changed.

But another thing:
I my test from above, there only the js-file correct inluded, not the css file!

Both files are correct.


If I rename the css-file (html and assests directory index-2ZaS5HyD.cssstyles-vue.css)
it works!

It’s really strange …
It can’t have anything to do with capitalization.

I found out:
It has something to do with the browser cache.
But I don’t know how yet…

1 Like

I consider the experiment - embedding VUE directly - has failed.
Will embed VUE / NUXT with an IFrame in GHOST.

Or the opposite:
Ghost as a headless CMS and build a completely custom front-end with Vue and Nuxt.js