You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bundling the lodash library should only incur the cost of the modules that are referenced, not an entire library.
Actual behavior
The lodash library imported via "lodash": "^4.17.11", in package.json leads to a very large bundle by importing the main lodash library (which is about 500k)
Steps to reproduce behavior
Disable cache and open your console and load the home page. You will get the lodash file downloaded:
Proposed Solution
There is a package for lodash combiled with AMD modules. In spite of what @ai believes, AMD support is still alive and kicking, and we can benefit from this library to only include dependencies that we actually require.
Changing package.json to have "lodash-amd": "^4.17.11", and updating the packages config to point to the new reference, we can use the specific lodash moduels via:
define(['lodash/chunk'],(chunk) -> { ... use chunk ... });
The text was updated successfully, but these errors were encountered:
Expected behavior
Bundling the lodash library should only incur the cost of the modules that are referenced, not an entire library.
Actual behavior
The lodash library imported via
"lodash": "^4.17.11",
in package.json leads to a very large bundle by importing the main lodash library (which is about 500k)Steps to reproduce behavior
Disable cache and open your console and load the home page. You will get the lodash file downloaded:
Proposed Solution
There is a package for lodash combiled with AMD modules. In spite of what @ai believes, AMD support is still alive and kicking, and we can benefit from this library to only include dependencies that we actually require.
Changing package.json to have
"lodash-amd": "^4.17.11",
and updating the packages config to point to the new reference, we can use the specific lodash moduels via:define(['lodash/chunk'],(chunk) -> { ... use chunk ... });
The text was updated successfully, but these errors were encountered: