how to use process.env.some_key in node_modules? #9153
Unanswered
weirui88888
asked this question in
Q&A
Replies: 1 comment
-
According to this issue #7782 Parcel will not inject env variables into node_module packages. I am aware that this could potentially be a security risk, but in some cases where the node_module is controlled by the organization, it would make sense to allow for some sort of opt in behavior. This is something that was possible with create-react-app as this is what we are currently using to make this possible. I am still learning about parcelJS, but if anyone could chime in on if this would be possible to do via a plugin, I can put something together. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When using parcel for the first time, there are some things that I don’t understand. In the parcel application, how to read the environment variables in the node_module package.
In the entry file, I can get the environment variable such as process.env.BUTTER_SERVICES_GATEWAY set in .env.development, but in a package of node_modules, I can’t get process.env.BUTTER_SERVICES_GATEWAY
Beta Was this translation helpful? Give feedback.
All reactions