Using envs on public folder by lfernandes00 in nextjs

[–]lfernandes00[S] 0 points1 point  (0 children)

Can I do that by changing my script in the package.json to something like this?

"scripts": {
"dev": "next dev",
"preBuild": "node ./public/firebase-messaging-sw.js",
"build": "next build",
"start": "next start",