Vue routing and dynamic imports

Sitename = dynamic-starburst-63f97a

I’m trying to set up correct routing on my vue app and have already setup the rewrite like following
from = “/*”
to = “/index.html”
status = 200

Now, when i access my site the routing just does not work and i get errors in the console telling me dynamic imports are failing. I thought this might be caused by the redirect so i added an extra redirect to make sure js files get hosted normally

from = “/js/*”
to = “/:splat”
status = 200

and since the error also state something about cors : …has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
i also added following header information
for = “/"
Access-Control-Allow-Origin = "

But to no avail, the app just does not want to work. Am i looking at this problem in the wrong way?

A few minutes after posting this i found out what the problem was : i turned on asset optimization at some point. turning this back off fixed my problem.

Hey there, @Mostaard :wave:

So glad that you found a solution so quickly! Thanks for coming back and sharing it with the Forums-- it will be helpful to future members who encounter the same obstacle.

Happy building :rocket: