so I recently wanted to install ws but webpack suddenly threw out 17 errors.
So basically I:
- yarn added ws
- imported ws
- Typed in
const connection = new ws.WebSocket("ws://127.0.0.1:6463/?v=1"); - compiled with errors
Errors:
This error is for multiple packages, basically adding a fallback "crypto... did nothing. Neither did installing crypto-browserify etc.
const NodePolyfillPlugin = require("node-polyfill-webpack-plugin")
module.exports = {
resolve: {
alias: {
path: require.resolve("path-browserify")
}
},
target: 'node',
plugins: [
new NodePolyfillPlugin()
]
}
My webpack.config.js looks like this. I've already tried some things in there.
My question is. How do I get it working?
