Skip to content
This repository was archived by the owner on Feb 25, 2019. It is now read-only.

Commit 5303c62

Browse files
Merge pull request #81 from hovenko/documents_webpack_usage
Adds documentation that this module cannot be used with Webpack
2 parents a2d92b8 + ef98bb8 commit 5303c62

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,25 @@ encourage or provide a [native, if not core][wtf] Web Cryptography module.
5353
$ npm install @trust/webcrypto --save
5454
```
5555

56+
### Not for use in Webpack
57+
58+
This library is not for use in Webpack.
59+
60+
The whole point of this library is that it's an exact duplicate of the browser's WebCrypto API,
61+
for the server side.
62+
63+
For Webpacked web applications,
64+
you don't need it (and can't use it).
65+
If this module is transitively included by another dependency,
66+
you have to exclude it by adding it to the [`externals` section in the Webpack config](https://webpack.js.org/configuration/externals/),
67+
such as this:
68+
69+
```
70+
externals: {
71+
'@trust/webcrypto': 'crypto'
72+
}
73+
```
74+
5675
## Usage
5776

5877
```javascript
@@ -109,7 +128,7 @@ Only the following paramaters are supported for the corresponding algorithm.
109128
| Algorithm name | Supported paramater |
110129
| -------------- | ------------------- |
111130
| ECDSA | `K-256 (secp256k1)`, `P-256`, `P-384`, `P-512` |
112-
| EDDSA | `ed25519` |
131+
| EDDSA | `ed25519` |
113132
| AES-CTR | `sha-1` |
114133

115134

0 commit comments

Comments
 (0)