How to alias root url to a specific page in next.js

Shan Dou
1 min readMay 28, 2019

--

I have been working on a next.js + flask app. The landing page ideally should point to a specific page called signals instead of an empty index.js

I tried more complicated ways following some Q&As I found on Github and StackOverflow. It turns out all I need to change is the top level next.config.js

module.exports = {
exportPathMap: function() {
return {
'/', {page: '/signals'}
}
}
};

--

--

Shan Dou
Shan Dou

No responses yet