From 43eb8646799d4ce9a995320b8422ffbaf86e5b62 Mon Sep 17 00:00:00 2001 From: Army-U Date: Wed, 23 Jan 2019 16:16:35 +0800 Subject: [PATCH] docs(README): usage about tree shaking --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index da8e10c..d0a5116 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,27 @@ isEmpty(10) // => false isEmpty('') // => true ``` +### Load on demand + +```bash +$ npm i @babel/env babel-plugin-import -D +``` + +```json +{ + "presets": [ + ["@babel/env", { "modules": false }] + ], + "plugins": [ + ["import", { + "libraryName": "sewing", + "libraryDirectory": "dist", + "style": false + }] + ] +} +``` + ### Development ```bash