v4-beta : use env variable with config as a function
See original GitHub issueDescribe the bug
We need to manipulate env vars in the config file to adjust the compilation entries points
What is the current behavior?
Cli does not recognize --env.MYVAR parameter
Config returning this kind of result is not considered by CLI without any error message :
module.exports = (env) => { return { // my conf }
To Reproduce
encapsulate your config object in a function and try to compile it.
Expected behavior
CLI should receive config functions and --env parameters
Screenshots
Compilation results without function
Compilation result with function
Unknown --env params
Issue Analytics
- State:
- Created 3 years ago
- Comments:19 (16 by maintainers)
Top Results From Across the Web
Use Environment Variable in your next Golang Project
Open the terminal in the project root directory. go get github.com/spf13/viper. To set the config file and path viper.SetConfigFile(".env ...
Read more >Using Environment Variables | Cloud Functions Documentation
Setting runtime environment variables · Open the Functions Overview page in the Google Cloud console: · Click Create function. · Fill in the...
Read more >env - Functions - Configuration Language | Packer
env allows you to get the value for an environment variable inside input variables only. This is the only function that is callable...
Read more >Setting environment variable in react-native? - Stack Overflow
If you're using Buddybuild for CI to build an app and manage environment variables, and you need access to config from JS, create...
Read more >Load config from file & environment variables in Golang with ...
When developing and deploying a backend web application, we usually have to use different... Tagged with go, tutorial, beginners, webdev.
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 Free
Top 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
Agreed.
For complex cases you should use
webpack.config.js
, no need to support misleading behaviorweback-cli --resolve-alias-alias alias1 alias2
can beweback-cli --resolve-alias-alias index.js main.js
and you can never understand what the developer meant