netlify dev with the following redirects rule on create-react-app (latest version 3.4.1) causes all requests to the
/static dir to be redirected to
[[redirects]] from = "/*" to = "/index.html" status = 200
This causes e.g. the
/static/bundle.js to return the
index.html causing a syntax error as shown in screen shot of dev tools:
The only way I’ve been able to solve it so far is to add a redirect rule for
/static/:splat above the existing rule i.e.
[[redirects]] from = "/static/*" to = "/static/:splat" status = 200
This seems wrong, weirdly there is no issue on live .netlify.com url. Only
netlify dev. Am running version 2.40.0 of netlify-cli.