Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code splitting #145

Open
MartinMalinda opened this issue Oct 23, 2021 · 0 comments
Open

Code splitting #145

MartinMalinda opened this issue Oct 23, 2021 · 0 comments

Comments

@MartinMalinda
Copy link

MartinMalinda commented Oct 23, 2021

Hi! One benefit of Quill is that it is modular.

So you can import like this

import Quill from 'quill/core';
import Bold from 'quill/formats/bold';
import Italic from 'quill/formats/italic';
import Snow from 'quill/themes/snow';
import Toolbar from 'quill/modules/toolbar';

And load just the code you need and keep the bundle size reasonably low (40kb).

But because this lib is doing import Quill from "quill"; it causes quill to load either twice, or with some extra dependencies for me.

This happens with vite.

quill-mention causes the same issue for me: quill-mention/quill-mention#223

quill-magic-url doesn't cause this issue. It doesn't do Quill.register for you and it only imports quill-delta, not whole quill.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant