Skip to content

Conversation

adamkiss
Copy link
Contributor

@adamkiss adamkiss commented Nov 3, 2017

I added a Config.server.proxy option for browser-syn, to allow proxy to different server in the background (which then handles serving the spike built files). This option must be string or object with key target, and if is defined, Config.server.server must be set to false.

I added all of this to Joi schema and put the Config.server.server.baseDir setting behind check for existence of server.

ignored: Joi.array().default('node_modules')
}),
server: Joi.object().default({}),
server: Joi.default({})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How come object came out here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess because it can be false now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we need to default to empty object before we check Joi.exist('proxy'), otherwise that check passess, the server is set to {} afterwards and then browser-sync will fail the proxy option (Server must be false with proxy option…)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jescalan jescalan merged commit 9ee6e6e into static-dev:master Nov 6, 2017
@adamkiss
Copy link
Contributor Author

adamkiss commented Nov 6, 2017

🎉

@jescalan
Copy link
Member

jescalan commented Nov 6, 2017

👬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants