ifandelse / machina.js

js ex machina - finite state machines in JavaScript
http://machina-js.org/
Other
1.93k stars 147 forks source link

Using modular lodash approach to get smaller builds with webpack ? #121

Closed riston closed 6 years ago

riston commented 8 years ago

The library seems great and powerful, but the problem I see for the web is lodash dependency which is the large one. Instead of requiring full lodash library could use the modular approach, there are actually around ~10 functions used from there.

These could be just replaced with example: // (great for smaller builds with browserify/webpack) var chunk = require('lodash/array/chunk');

There are also a separate method based builds also https://www.npmjs.com/browse/keyword/lodash-modularized.

ifandelse commented 6 years ago

@riston definitely agree with you on this (and apologies for the long delay....see #146 :-)). I plan to address this in the near future, thanks!