]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
docs: make "direct import" for tree shaking sounds less imperative
authorNicolas Coden <nicolas@ncoden.fr>
Thu, 23 Aug 2018 21:47:40 +0000 (23:47 +0200)
committerNicolas Coden <nicolas@ncoden.fr>
Thu, 23 Aug 2018 21:49:54 +0000 (23:49 +0200)
docs/pages/javascript.md

index 16dddae7d44b55a8747ccfbaf0cb57e2e9c04e95..834c2865cb6a4ea5fe0268310e62cdb8a05fc998 100644 (file)
@@ -67,7 +67,7 @@ var $dropdown = new Dropdown('#mydropdown');
 
 Many bundlers like Webpack, Rollup or Parcel support tree shaking. It consists of the removing the unused code parts from your codebase or your dependencies. Take a look at these articles to know how it works and how to enable it: [How To Clean Up Your JavaScript Build With Tree Shaking](https://www.engineyard.com/blog/tree-shaking), [Why Webpack 2's Tree Shaking is not as effective as you think](https://advancedweb.hu/2017/02/07/treeshaking/) and [Reduce JavaScript Payloads with Tree Shaking](https://developers.google.com/web/fundamentals/performance/optimizing-javascript/tree-shaking/).
 
-Sadly, the "static analysis" promised by these bundlers to detect unused code in dependencies does not usually work, so we recommend you to manually import the Foundation plugins instead, like the following:
+Sadly, the "static analysis" promised by these bundlers to detect unused code in dependencies does not always work. Depending on your build environment, you may have to manually import the Foundation plugins to make it work correctly:
 
 ```js 
 import Dropdown from 'foundation-sites/js/foundation.dropdown';