sitename https://unruffled-jang-4961e9.netlify.app/
I have HMR working ok with a React app while in local development.
In the netlify.toml
I have
[build]
functions = "functions"
publish = "dist"
[context.production]
command = "npm run build && cd functions/node-fetch && npm install"
[context.development]
command = "npm run build-dev"
[dev] # config specific to `netlify dev`
framework = "#custom"
command = "npm run start-dev"
targetPort = 3000
port = 8888
publish = "dist"
[[redirects]] # this is new and not working right
from = "/*"
to = "/index.html"
status = 200
Run with
npx cross-env NODE_ENV=development API_KEY=abcd npx netlify dev
I was just trying to add a frontend view router to the application, so there are now a number of different possible URL paths, all of which should equivalently be served with the html associated with dist/bundle.js
.
I think the 2 ports involved in the netlify dev
setup makes it not work, when the app tries to route to one of its other views it gets kind of intercepted and reloaded, and doesn’t really succeed at that.
Lmk please, if the setting looks wrong, or perhaps netlify dev
doesn’t support this custom two port setup and also view routing?