Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respecting vhost option at plugin registration. {options: {routes: {vhost: ''}} #13

Open
mashaalmemon opened this issue Mar 31, 2017 · 0 comments

Comments

@mashaalmemon
Copy link
Contributor

Hi @SimonDegraeve,

Thanks for accepting my pull request for Webpack 2.

I have a use case where my app has different applications (admin area, client area, etc.) which are each separate webpack bundles themselves. Each of these applications actually are served up in my setup on different vhosts (http://admin.mydomain.com, http:, client.mydomain.com) etc. The way the plugin is incorporated into the hapi framwork it doesn't allow this.

However when registering a plugin via server register, options.routes.vhost is an option that can be set as per the hapi API. I'd like to have the plugin respect this option when passed in and only execute the plugin for requests to the vhost vs to any request (which is what happens now)

I am soon to submit another pull request into the codebase that allows one to take advantage of vhosts for the plugin, and have multiple hapi-webpack-plugin's running, each one serving up a unique webpack bundle on a different vhost.

Note, i'm working to ensure it isn't a breaking revision; that is, if the vhost option is not set, it will behave just as it did before. Hopefully you'll be able to accept that pull request into the codebase as well.

I shall reference this issue within the pull request when it's ready.

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

No branches or pull requests

1 participant