From: Nicolas Coden Date: Fri, 21 Sep 2018 21:31:55 +0000 (+0200) Subject: docs: add the package.json entry in Javascript documentation X-Git-Tag: v6.6.0~3^2~91^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F11508%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git docs: add the package.json entry in Javascript documentation --- diff --git a/docs/pages/javascript.md b/docs/pages/javascript.md index a20e44964..f6c5a8503 100644 --- a/docs/pages/javascript.md +++ b/docs/pages/javascript.md @@ -73,10 +73,10 @@ Foundation is proposed in bundles of various module formats so you can pick the * `foundation.cjs.js` CommonJS
Dedicated to Node.js and older bundlers like Browserify or Webpack v1. -* `foundation.esm.js` ES6 Modules
+* `foundation.esm.js` ES6 Modules (`module` in `package.json`)
Everything is transpiled to ES5 but the modules. Dedicated to modern bundlers, like Webpack 2+ or Rollup. They will automatically use this bundle and parse the ES6 modules to remove the unused code (see [tree shaking](#tree-shaking) below). -* `foundation.es6.js` ES6
+* `foundation.es6.js` ES6 (`esnext` in `package.json`)
Unlike the others bundles, this bundle is not transpiled. It contains all the Foundation sources in ES6 in a single file. Use it if you want to manually transpile it for your own targets. #### Tree Shaking