I have an old test project originally built with Express 2.X. I am moving it to Express 4.x and trying to insert Babel 6.x to experiment with ES6 features server-side.
T
Try this:
export default router;
The problem is that you are exporting router
as named export router
, but trying to import it as indexRoute
.
You should either rename your export:
export { router as indexRoute }
or change your import:
import { router as indexRoute } from './routes/index_route';