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

vue 3 default" is not exported #150

Open
Olegars opened this issue Jan 2, 2023 · 4 comments
Open

vue 3 default" is not exported #150

Olegars opened this issue Jan 2, 2023 · 4 comments

Comments

@Olegars
Copy link

Olegars commented Jan 2, 2023

vue 3
yarn build
"default" is not exported by "node_modules/quill-image-resize-module/image-resize.min.js", imported by "src/views/editor.vue".

5: import ImageResize from "quill-image-resize-module";
^

@LDY681
Copy link

LDY681 commented Jan 4, 2023

vue 3 yarn build "default" is not exported by "node_modules/quill-image-resize-module/image-resize.min.js", imported by "src/views/editor.vue".

5: import ImageResize from "quill-image-resize-module";
^

import * as ImageResize from "quill-image-resize-module";
I am using Vite with Vue 2. This works for me and should be good with Vue 3 too.

@Hbin-Zhuang
Copy link

Hbin-Zhuang commented Mar 27, 2023

vue 3 yarn build "default" is not exported by "node_modules/quill-image-resize-module/image-resize.min.js", imported by "src/views/editor.vue".

5: import ImageResize from "quill-image-resize-module";
^

import * as ImageResize from "quill-image-resize-module"; I am using Vite with Vue 2. This works for me and should be good with Vue 3 too.

i got the new error of " quill.js:6130 Uncaught (in promise) TypeError: moduleClass is not a constructor" by using this

@lv23ji
Copy link

lv23ji commented Jun 1, 2023

vue 3 yarn build "default" is not exported by "node_modules/quill-image-resize-module/image-resize.min.js", imported by "src/views/editor.vue".

5: import ImageResize from "quill-image-resize-module";
^

import * as ImageResize from "quill-image-resize-module"; I am using Vite with Vue 2. This works for me and should be good with Vue 3 too.

i got the new error of " quill.js:6130 Uncaught (in promise) TypeError: moduleClass is not a constructor" by using this

The correct way to use it is

import "quill-image-resize-module/image-resize.min.js"

@joekrump
Copy link

joekrump commented Oct 4, 2023

The solution that worked for me was:

import ImageResize from 'quill-image-resize-module';

//...

// Note the module is registered as `imageResize` not `ImageResize`
Quill.register('modules/imageResize', ImageResize);
// ...

const quill = new Quill(editorEl, {
    modules: {
       // Note: 'imageResize' (the name needs to match what it was registered as).
       imageResize: {
         modules: ['Resize', 'DisplaySize', 'Toolbar'],
      },
    }
});

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

5 participants