diff --git a/docs/pages/_comparison-table.md b/docs/pages/_comparison-table.md index 784cdb9f..69657102 100644 --- a/docs/pages/_comparison-table.md +++ b/docs/pages/_comparison-table.md @@ -7,11 +7,11 @@ | Expires & Age header | ✅ | 🟡 | 🛑 | | ETag and If-None-Match header | ✅ | 🛑 | 🛑 | | If-Modified-Size header | ✅ | 🛑 | 🛑 | -| Bundle Size | **3.6Kb** (gzip) | 18.9Kb (gzip) | 19.5Kb (gzip) | +| Bundle Size | **3.6Kb** (gzip) | 18.9Kb (gzip) | 19.5Kb (gzip) | | Typescript declaration | ✅ (Custom interface) | ✅ (Applied globally) | ✅(Applied globally) | | Custom cache keys | ✅ | ✅ | ✅ | | Multiple storages | ✅ | 🔶 (Only localForage) | ✅ | -| Built-in redis storage | 🟡 (Documented) | ✅ | 🟡 | +| Built-in redis storage | 🔶 | ✅ | 🟡 | | Storage size limit | 🔶 | ✅ | ✅ | | Node & Web compatible | ✅ | ✅ | 🛑 | | Invalidade cache based on response | ✅ | ✅ | 🛑 | @@ -19,3 +19,4 @@ | Predicate to test if request should be cached | ✅ | ✅ | 🛑 | | Concurrent requests | ✅ | 🔶[#231](https://github.com/RasCarlito/axios-cache-adapter/issues/231) | 🛑 | | Cache fallback on network errors | ✅ | ✅ | ✅ | +| Debug / Development mode | ✅ | ✅ | 🛑 | diff --git a/docs/pages/compiled-code.md b/docs/pages/compiled-code.md index 28dce609..7fc08abf 100644 --- a/docs/pages/compiled-code.md +++ b/docs/pages/compiled-code.md @@ -2,10 +2,10 @@ ## CommonJS -The code compiled with `CommonJS` is for ES2017+. +The code compiled with `CommonJS` is for ES6+. ```js -import { setupCache } from 'axios-cache-interceptor'; // (Default is CJS) +import { setupCache } from 'axios-cache-interceptor'; // (Defaults to cjs) import { setupCache } from 'axios-cache-interceptor/cjs'; ``` @@ -17,21 +17,17 @@ The UMD code is compiled with `webpack` to support `>= ES5`. See the [build config](build/webpack.config.js). You can import these files anywhere (Browser, CommonsJS, ESM and more) -- `axios-cache-interceptor/umd/es6.js`: Production file for ES6+ - `axios-cache-interceptor/umd/es5.js`: Production file for ES5+ -- `axios-cache-interceptor/umd/index.js`: Production file for ES2017+ +- `axios-cache-interceptor/umd/index.js`: Production file for ES6+ ```html - + - + - + ``` @@ -42,7 +38,7 @@ import { setupCache } from 'axios-cache-interceptor/umd'; ## ESModule -The code compiled with `ESModule` is for ES2017+. +The code compiled with `ESModule` is for ES6+. This library exports its `ESM` code at `axios-cache-interceptor/esm`. It's useful to enable _tree-shaking_ and other optimizations. You probably won't have to directly import @@ -51,3 +47,18 @@ from this folder, instead, bundlers should do that for you. ```js import { setupCache } from 'axios-cache-interceptor/esm'; ``` + +## Development bundles + +All development bundles are compiled with support for ES2017+, and are available as UMD, +CJS and ESM. + +```js +import { setupCache } from 'axios-cache-interceptor/esm/dev'; +const { setupCache } = require('axios-cache-interceptor/umd/dev'); + +// https://cdn.jsdelivr.net/npm/axios-cache-interceptor/umd/dev.js +const { setupCache } = window.AxiosCacheInterceptor; +``` + +See more about them at [Development mode](pages/development-mode.md)