Correctly Handling Local Dev URL in Sage 10's Version Controlled bud.config.js

In Sage 9, I created config-local.json alongside config.json and used config-local.json to store my devURL. The config-local.json file was excluded from GIT.

With Sage 10, I’m asked to set me local dev server in the bud.config.js file.
The bud.config.js file is version controlled, so I’m wondering on the best way to handle this issue.

Any feedback would be greatly appreciated.

1 Like

Howdy! You’re the first to ask since we’ve made the switch to Bud :smiley: Have you happen to see this yet?

1 Like

The instructions seem fairly straight forward, but I don’t think what I’ve done it working correctly.

I run yarn dev and get the following output.

[dev] http://localhost:3000
[proxy] http://kwd-it-22.test

I’ve removed the following from bud.config.js

/**
     * Target URL to be proxied by the dev server.
     *
     * This is your local dev server.
     */
     .proxy('http://kwd-it-22.test')

I’ve then created bud.config.development.js with the following.

/**
 * @typedef {import('@roots/bud').Bud} bud
 *
 * @param {bud} app
 */
module.exports = async (app) => {
  app
    /**
     * Target URL to be proxied by the dev server.
     *
     * This is your local dev server.
     */
    .proxy('http://kwd-it-22.test')
};

Now if I run yarn dev, I just get the following output.

[dev] http://localhost:3000

Link is Page Not Found, please check this, thanks

Here’s the new docs link since this topic pops up on top of Google:

2 Likes

An even newer link to the “Multiple Configuration Files” documentation: