meteor-froala icon indicating copy to clipboard operation
meteor-froala copied to clipboard

Dynamic import

Open adamgins opened this issue 3 years ago • 4 comments

Hi there, there Froala editor awesome but it's pretty large, ~900KB, and is included in the bundle, which slows things down significantly.

We'd like to make this a dynamic import https://docs.meteor.com/packages/dynamic-import.html so it's only imported when it loads, thus significantly reducing bundle size.

I am not sure if there is a way we can do this with the current version or if that's a feature request?

adamgins avatar Nov 14 '21 23:11 adamgins

https://github.com/meteor/meteor/issues/8745#issuecomment-524480226

adamgins avatar Nov 16 '21 01:11 adamgins

Is there any response on this - we're at a point where we may need to move away from this package due to this issue

there are some possible easy fixes. I contacted the Meteor folk and one recommendation was

This package needs some rework, as the best would be to serve these files from the public folder only when the component loads, instead of including all these files in the bundle.

So this could be as simple as just moving/references the files from / in the /public folder. Are you able to do this or would you accept a pull request?

adamgins avatar Dec 23 '21 01:12 adamgins

@harasunu-narayan

adamgins avatar Dec 23 '21 01:12 adamgins

Hi any further response on this pls?

adamgins avatar Feb 12 '22 22:02 adamgins