Read A Local File In Nextjs
January 2022
This is done with getStaticProps which happens on the server side
Note that in the node docs fs is included via const fs = require('fs') but here it's done with import fs from 'fs'
end of line
This is done with getStaticProps which happens on the server side
Note that in the node docs fs is included via const fs = require('fs') but here it's done with import fs from 'fs'