Open Schachte opened 4 years ago
My goal here is to get a bundle for my serverside express bundle with HMR support using the webpack NodeJS API. I'm not quite sure if I'm approaching this problem correctly.
// returns 2 item array [0] = client [1] = server const config = webpackConfig(); const devServer = { host, port, ...config.devServer } WebpackDevServer.addDevServerEntrypoints(config[0], devServer) const compiler = webpack(config) const server = new WebpackDevServer(compiler, devServer) server.listen(port, host, err => { if (err) { console.error(err) process.exit(1) } else if (args.open) { openBrowser(`http://${host}:${port}${publicPath}/`) } })
I'm hoping that the server for node (express) will be running as well as the clientside bundle. How can I achieve this?
My goal here is to get a bundle for my serverside express bundle with HMR support using the webpack NodeJS API. I'm not quite sure if I'm approaching this problem correctly.
I'm hoping that the server for node (express) will be running as well as the clientside bundle. How can I achieve this?