1

How do I hook into the startup of a NextJS server so that I can do one-off initialization?

There's a discussion here but so far no solution.

Guy
  • 62,854
  • 93
  • 248
  • 316
  • if you have your own rollup, you can `npm i -D @rollup/plugin-json`. But if you don't have your own build, then maybe the easiest is to convert it into a js file. Check https://stackoverflow.com/questions/34944099/how-to-import-a-json-file-in-ecmascript-6 for all options. – windmaomao Nov 15 '21 at 20:59
  • Here's a discussion along the lines of what I'm looking for: https://github.com/vercel/next.js/discussions/11686 – Guy Nov 16 '21 at 20:55

0 Answers0