question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

v4-beta : use env variable with config as a function

See original GitHub issue

Describe 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 image

Compilation result with function image

Unknown --env params image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:19 (16 by maintainers)

github_iconTop GitHub Comments

1reaction
snitin315commented, Jul 31, 2020

Agreed.

1reaction
alexander-akaitcommented, Jul 31, 2020

For complex cases you should use webpack.config.js, no need to support misleading behavior weback-cli --resolve-alias-alias alias1 alias2 can be weback-cli --resolve-alias-alias index.js main.js and you can never understand what the developer meant

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found