process.env and webpack
See original GitHub issuewe have the same problem with the process.env and webpack. Webpack replaces process.env.VAR with value and can’t do that properly when it obfuscate to process[_0x3ab67a(0x74)][_0x3ab67a(0x6b)]);
Expected Behavior
process.env.VAR
is not replaced
Current Behavior
process.env.VAR
is replaced with process[_0x3ab67a(0x74)][_0x3ab67a(0x6b)])
Steps to Reproduce
- create a package with contains process.env.VAR
- obfuscate the new package
- include a new package in webpack project
- 😦
Temp solution
For now, we have to use
/* javascript-obfuscator:disable */
const VAR = process.env.VAR;
/* javascript-obfuscator:enable */
Proper solution
create an option to not obfuscate process.env
Issue Analytics
- State:
- Created a year ago
- Comments:15 (6 by maintainers)
Top Results From Across the Web
EnvironmentPlugin - webpack
The EnvironmentPlugin is shorthand for using the DefinePlugin on process.env keys. Usage. The EnvironmentPlugin accepts either an array of keys or an object ......
Read more >Using environment variables with Webpack - Prateek Surana
A guide for setting up and using environment variables with Webpack and handling different values for Production and Development ...
Read more >Passing environment-dependent variables in webpack
I have 2 webpack configs currently: webpack.production.config.js new webpack.DefinePlugin({ 'process.env':{ 'NODE_ENV': ...
Read more >A Dead Simple Guide to Using Environment Variables in Your ...
Using the node package dotenv-webpack we can access our .env file easily from ... 'process.env' variables which will trump anything local per dotenv...
Read more >Using Environment Variables With React & WebPack
If you are using DotEnv there's a couple more steps you have to take to get it working unlike if your using DotEnv...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
process.env.NODE_ENV confused, run with error