Replies: 4 comments 13 replies
-
Hi @Relypete. What is the script doing? |
Beta Was this translation helpful? Give feedback.
-
TIL, you can run nodejs scripts at build time with
|
Beta Was this translation helpful? Give feedback.
-
For any prebuild steps, just add the {
...
"scripts": {
"build": "next build",
"postbuild": "node ./path-to/my-prebuild-script.mjs",
"dev": "next dev",
"start": "next start",
"lint": "next lint"
}
...
} When Next.js goes to run the As @DeBraid referenced, checkout @leerob 's tutorial on creating a dynamic sitemap. In his example, he adds the script to the |
Beta Was this translation helpful? Give feedback.
-
You may also be interested in this tool to fetch & save data in build time: Use cases:
|
Beta Was this translation helpful? Give feedback.
-
Probably by changing the webpack config?
Beta Was this translation helpful? Give feedback.
All reactions