In trying to resolve my issues getting Aurelia Webpack to run on OpenShift, I've come across an issue where I need to be able to create a proxy in Webpack devServer in order to handle websocket connections.
With the way easy-webpack is set up right now, there doesn't seem to be an easy way for me to pass in a proxy object to the devServer configuration. Maybe I'm just not understanding how to pass configuration objects to config-env-development properly (there seems to be a devtool option but it's not clear to me how to pass other settings). So assuming my problem isn't a lack of understanding, I would like to propose a solution similar to the following.
Since the metadata object in core is already being used for server configuration settings such as host and port, I would like it if you could also place proxy configuration objects there as well. Of course config-env-development and confog-env-production would need to be updated to use that configuration, since they handle the configuration of devServer itself.
Just for example, this is the configuration option I'm trying to pass to devServer but currently don't know how to do within easy-webpack:
proxy: {
'/sockjs-node/*': {
target: 'ws://localhost:8000',
ws: true,
},
},
┆Issue is synchronized with this Asana task