Skip to content

Add custom EventSource and web socket url #51

Closed
@matheus1lva

Description

@matheus1lva

I'm currently one of the maintainers on webpack-plugin-serve and we also want to support it (specially for one my use cases).

But due to how tangled to wds and wdm this plugin is, we would need support for custom message handlers (similar to https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/master/src/runtime/WHMEventSource.js) and a custom websocket properties!

Would these things be supported? Technically i don't want to embbed a custom message handler to this as well, i would like to leave it as generic as it would be so we can add more extensiability!

something like:

new ReactRefreshWebpackPlugin({
   ws: {
     url: localhost,
     port: 12345
   },
   messageHandler: () => {
     ....
   }
})

what do you guys think?

Edit: so we already have one PR on going, which would help 1/2 of this issue: #44

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions