A sample Webpack build for the server.
$ npm i
$ npm run build
$ npm start
Note:
-
the
bufferutil
andutf-8-validate
are optional dependencies fromws
, compiled from native code, which are meant to improve performance (ref). You can also omit them, as they have their JS fallback, and ignore the WebPack warning. -
the server is initiated with
serveClient
set tofalse
, so it will not serve the client file.