Closed hassankhan closed 6 years ago
Hi @hassankhan. Interesting use case you have there. My only concern is that some of the environment variables are only know after deployment, e.g. all the AWS pseudo variables and references to CloudFormation resources using Fn::ImportValue
will become available once the stack is finished creating, not before. So any environment resolved in the before:deploy
hook would potentially be incomplete or invalid. Do you have some more details on what those environment variables used for Webpack would refer to?
Ahh you're correct, I meant after:deploy
.
I wanted to use Webpack's NODE_ENV=production
for production builds, but setting that manually resulted in only NODE_ENV
being available (at least on local).
The idea was that this package would generate the env, then I guess re-deploy the functions :/
Not sure if this is a supported or recommended use-case, but I'd like the
.env
exported from this package to be used bywebpack-dotenv-plugin
in my Webpack build.Would you accept a PR for it? 😄