summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2021-04-17 22:59:54 -0700
committerMatthew Miller <matthew@millerti.me>2021-04-17 22:59:54 -0700
commit4ba6945db66b5947b3fc8ae0f8faf77a130cf65d (patch)
treea2a6da679cffcfb6272e2ca480c442be88235598
parent014ff02a14ee27c409ce26c836bb21099a2bffd1 (diff)
Clean up browser README
-rw-r--r--packages/browser/README.md10
1 files changed, 6 insertions, 4 deletions
diff --git a/packages/browser/README.md b/packages/browser/README.md
index e521305..01234ac 100644
--- a/packages/browser/README.md
+++ b/packages/browser/README.md
@@ -56,11 +56,11 @@ You can find in-depth documentation on this package here: https://simplewebauthn
## Building for Production
-Two unbundled versions of this library are offered for your convenience, one targeting `ES2018` and a second targeting `ES5`.
+Two unbundled versions of this library are offered for your convenience, one targeting `ES5` and a second targeting `ES2018`.
### ES5
-The `ES5` version is suitable for use when **old browsers** need to be supported and it's **default** version of this library which is read in the `main` entry from @simplewebauthn/browser's **package.json**.
+The `ES5` version is suitable for use when **deprecated browsers** like IE10+ or Edge Legacy need to be supported. This version is also the **default** version that gets pulled in as the `"main"` entry in **package.json**.
TypeScript and JavaScript codebases alike can import and use this library without any special build configuration considerations.
@@ -77,9 +77,11 @@ $> npm install tslib
The `ES2018` version is suitable for use when only **modern browsers** need to be supported. TypeScript and JavaScript codebases alike can import and use this library. However, you will need to ensure that your bundler pulls in the ES2018 version of the library when building your application!
+See bundler instructions below.
+
#### Webpack support
-No matter the `"target"` of your build, though, then you'll need to indicate additional files for WebPack to resolve via the [`"resolve.mainFields"`](https://webpack.js.org/configuration/resolve/#resolvemainfields) property in your Webpack config to read in the `main:es2018` entry from @simplewebauthn/browser's **package.json**:
+No matter the `"target"` of your build you'll need to indicate additional files for webpack to resolve via the [`"resolve.mainFields"`](https://webpack.js.org/configuration/resolve/#resolvemainfields) property in your config. Resolve the `"main:es2018"` field defined in **package.json**:
```js
module.exports = {
@@ -94,7 +96,7 @@ module.exports = {
#### Rollup support
-The [`@rollup/plugin-node-resolve`](https://github.com/rollup/rollup-plugin-node-resolve#usage) plugin has to be added to your Rollup config to read in the `main:es2018` entry from @simplewebauthn/browser's **package.json**:
+Add the [`@rollup/plugin-node-resolve`](https://github.com/rollup/rollup-plugin-node-resolve#usage) plugin to your Rollup config to read in the `"main:es2018"` field from **package.json**:
```js
// rollup.config.js