Skip to content

Commit

Permalink
add FAQ with webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
dcharbonnier authored Mar 29, 2018
1 parent b2147be commit 221ac6b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,16 @@ try {
} catch {
// the auth failed
}

```

### FAQ
#### Webpack
Webpack complain about the `ws` implementation of WebSocket, the errors are :
`Can't resolve 'net'` and `Can't resolve 'tls'`.

The solution consist in ignoring the ws module that can't be used in a browser (and not required), the polyfill will detect the browser implementation of the WebSocket and use it.
To ignore the module, add a rule to your webpack config file :
`{test: /[\/\\]node_modules[\/\\]ws[\/\\].+\.js$/, use: 'null-loader'},`



0 comments on commit 221ac6b

Please sign in to comment.