Reputation: 2686
I am trying to clean up project structure by moving 'Page' directory form root location to some internal folder's like client or frontend etc. Is there way to do it? and can I move css and images folder as well?
Upvotes: 2
Views: 6457
Reputation: 22696
As far as the pages
directory is concerned, it's not configurable yet but it has been discussed so the feature might be available some time in the future: https://github.com/zeit/next.js/pull/936
Images are usually best kept in the static
folder, eg. /static/img/favicon.png
, if you move your images somewhere you'll lose Next.js feature of automatically setting up static files serving under /static/*
.
Regarding CSS however, you're free to move these files under any folder you want because you have to import them in your code yourself: https://github.com/zeit/next-plugins/tree/master/packages/next-css
Upvotes: 1