FNNDSC / ami

AMI Medical Imaging (AMI) JS ToolKit
https://fnndsc.github.io/ami/#viewers_upload
MIT License
721 stars 213 forks source link

Migrate from Browserify to Webpack3 #156

Closed NicolasRannou closed 7 years ago

NicolasRannou commented 7 years ago

https://rollupjs.org/

NicolasRannou commented 7 years ago

https://github.com/rollup/rollup-plugin-babel

Flos commented 7 years ago

Why not webpack2 ? https://gist.github.com/forabi/2a538b263d0f1fe5f041

NicolasRannou commented 7 years ago

Yes actually last time I checked webpack didn't have tree shaking but it seems to now support it.

Not quite sure is the best option for a library.

Any thought?

NicolasRannou commented 7 years ago

webpack 3 may actually be a good candidate as it provides scope hoisting: https://medium.com/webpack/webpack-3-official-release-15fd2dd8f07b

In my understanding, webpack is really good to serve things "on-demand" whereas rollup is more about providing small / fast bundles.

RusinovAnton commented 7 years ago

I would like to take this one, should I?

NicolasRannou commented 7 years ago

@RusinovAnton that'd be awesome - in general the current scripts need to be revisited for this project, here are the things we want:

Important thing to keep in mind is that AMI still needs babel polyfills but we are willing to get rid of it sooner than later.

NicolasRannou commented 7 years ago

@RusinovAnton see #194 related issue - please do not hesitate if you have any questions!

NicolasRannou commented 7 years ago

closed by #195

NicolasRannou commented 7 years ago

Quick question? I ran the analyze script and it seems that THREE.JS is taking soooo much room. Any clue why that would be happening? We only import very few THREE.JS packages and the rest should be left out if I am not mistaking... :/