title: Next.JS ISR for local file data
body: <p>I have ISR enabled for Next.JS page where it fetches data from a local JSON file during <code>getStaticProps</code>. Now I would like to update that file once in a while and want the page to automatically detect the changes and pre-rerender the page. The problem is that when I build the app it resolves that local JSON file into the pages which means that it does not really exist anymore in the build artifact. So the question is how I can prevent this from happening so I can still update that local file? Should I just keep the file outside of the project and access it via a environment variable?</p>