Ataskit editor-core bundle size problem

Hi,

I have started to use editor-core in my application. It works good but bundle size is huge. Webpack outputs a 15+ Mb vendor JS file just for editor-core and it’s dependencies. I have prepared a simple test scenario here. It has nothing except an tag. And it creates approximately 16mb bundle. I’m using webpack 4, I have set bundles to false in babel config so that web pack can perform tree shaking, but it is not working or is this the bundle size you need to accept for using editor from Atlaskit?

1 Like

We’re also hitting issues using editor-core, it’s adding around 6mb to our webpack bundle. I’m not sure if we have a configuration issue somewhere, or if this package is just huge. Using a lot of other atlaskit components elsewhere without issue.

Would appreciate it if anyone can give their 2cents.

Cheers

IIRC, the advise was to optimise your bundler configuration to use lazy loading and split chunks. If you do this properly, and not have all dependencies in one bundle, the size is doable.

I’ve always found this an entertaining tutorial on how to optimise webpack bundles: The 100% correct way to split your chunks with Webpack | by David Gilbertson | HackerNoon.com | Medium

I feared that may be the advice haha - no worries, if that size is normal we’ll look into splitting into chunks.

Appreciate the reply!