gatsby-uc / gatsby-plugin-s3

Deploy your gatsby site to a S3 bucket.
https://gatsby-plugin-s3.jari.io/
MIT License
210 stars 110 forks source link

ENV vars set via dotenv don't get picked up #402

Open norahine opened 1 year ago

norahine commented 1 year ago

Hello,

I'm trying to set the credentials using dotenv (in .env.development and .end.production files).

However, the deployment script ("deploy": "npm run -n \"-r dotenv/config\" && npm run build && gatsby-plugin-s3 deploy") is not picking them up (I confirmed this by passing them explicitly to npm run deploy).

At the top of gastby-config.js I have:

require("dotenv").config({
  path: `.env.${process.env.NODE_ENV}`,
}),

Did I miss anything? Thanks!