TIP: dynamic proxy setting

A quick tip for the lazy dev :melting_face:
If you’re using bedrock and don’t want to manually set bud proxy setting with each new project, you can do this:

In your theme folder

yarn add --dev dotenv
// bud.config.js
import * as dotenv from 'dotenv';
dotenv.config({path: '../../../../.env'});

...

.proxy(process.env.WP_HOME)
2 Likes

@LucasDemea Maybe I am wrong, but it should also be possible to use:

app.env.get('WP_HOME')

Without installing dotenv. Can you give it a try?

4 Likes

Indeed, even better. My snippet was coming from pre-bud times :older_man:

1 Like