summaryrefslogtreecommitdiff
path: root/date-fns/examples/webpack-2.x/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'date-fns/examples/webpack-2.x/README.md')
-rw-r--r--date-fns/examples/webpack-2.x/README.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/date-fns/examples/webpack-2.x/README.md b/date-fns/examples/webpack-2.x/README.md
new file mode 100644
index 0000000..5445742
--- /dev/null
+++ b/date-fns/examples/webpack-2.x/README.md
@@ -0,0 +1,26 @@
+# Usage With webpack 2.x
+
+**Important**: as at webpack 2.2.0, tree-shaking is not removing all unused imports.
+See [webpack issue #2867](https://github.com/webpack/webpack/issues/2867)
+
+See [example.js](./example.js), [fp.js](./fp.js) and [misc.js](./misc.js) for source code examples.
+
+See [package.json scripts](./package.json) for CLI usage.
+
+## Build Example
+
+```sh
+yarn
+yarn run build
+```
+
+See ./dist for output.
+
+## Minimal Build Size
+
+You can see minimal build size (when you use just one function):
+
+```sh
+gzip-size dist/example.min.js | pretty-bytes
+#=> 13.1 kB
+```