mirror of
https://github.com/socketio/socket.io.git
synced 2026-01-13 17:07:54 -05:00
In order to include [0], which fixes the following error:
ERROR in ./node_modules/engine.io/lib/server.js
Module not found: Error: Can't resolve 'uws' in '/media/damien/git/other-bets/socket.io-parent/socket.io/examples/webpack-build-server/node_modules/engine.io/lib'
@ ./node_modules/engine.io/lib/server.js 107:27-41
@ ./node_modules/engine.io/lib/engine.io.js
@ ./node_modules/socket.io/lib/index.js
@ ./lib/index.js
[0] 85e544afd9
Socket.IO WebPack build
A sample Webpack build for the server.
How to use
$ npm i
$ npm run build
$ npm start
Note:
-
the
bufferutilandutf-8-validateare 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
serveClientset tofalse, so it will not serve the client file.