thaliproject / thali

Our root repository for all of our projects
MIT License
86 stars 13 forks source link

We really should add rollup support #269

Open yaronyg opened 8 years ago

yaronyg commented 8 years ago

The NPM rollup project can take a whole mess of separate node.js files and roll them up into one monster file. This would help Thali in a bunch of ways including making loading apps faster since we wouldn't have the zip file processing overhead. Since we don't have a lot of optional code everything we have is more or less guaranteed to be loaded so this could help us. It's at least worth testing out.

What makes rollup really cool over says browserify is that it actually analyzes dependencies and just pulls in the code they need. This means that we could potentially radically reduce our footprint in the app since we have tons of dependencies where we aren't coming close to using everything they do.

To make this work we would have to switch to ES6 modules but we were anyway planning on moving to Typescript which already supports ES6 modules so we would be good.

mohlsen commented 8 years ago

Interesting project. I still own you a blog post on how we are trying to minimize this (deleting files basically). Wonder how this project work with native node_modules modules mixed in. I see a few issues related to them in their repo issue list.

yaronyg commented 8 years ago

I haven't really had a chance to investigate. But PouchDB uses them and they have an optional dependency on leveldown so one figures it can be made to work.