Skip to content

docs(dev-server): add transportMode docs and examples #3240

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

Merged

Conversation

knagaitsev
Copy link
Contributor

@knagaitsev knagaitsev commented Aug 9, 2019

describe your changes...

devServer.transportMode: #3239

I think that, rather than having large custom implementation examples in here, we should link to implementation examples in webpack-dev-server/examples.

@netlify
Copy link

netlify bot commented Aug 9, 2019

Preview is ready

Built with commit 2c41318

https://deploy-preview-3240--webpackjsorg-netlify.netlify.com

Copy link
Member

@EugeneHlushko EugeneHlushko left a comment

Choose a reason for hiding this comment

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

Hi @Loonride
requesting changes here, appreciate committing suggestions if you agree with them, otherwise lets discuss

@knagaitsev
Copy link
Contributor Author

I did a bit a bit of minor reorganization for the new transportMode.client and transportMode.server sections.

@knagaitsev
Copy link
Contributor Author

@EugeneHlushko Currently the types I have are:

devServer.transportMode:
string = 'sockjs': 'sockjs' | 'ws' object

devServer.transportMode.client:
string path

devServer.transportMode.server:
string path function

Should path be there, or should we just let that fall under string? If you think these are not specific enough, could you suggest how to make it fit in with the Writer's Guide guidelines?

  • Could string for the client and server be changed to string = 'sockjs': 'sockjs' | 'ws' | path?
  • Could I do function: class? I just need something making it clear that providing a plain function like server: () => {} will not be sufficient

@EugeneHlushko
Copy link
Member

Yes, i think it looks very good now

@EugeneHlushko EugeneHlushko merged commit afc4c6b into webpack:master Sep 3, 2019
@EugeneHlushko
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

4 participants