-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Wrong import and missing types in Quill 2.0 Beta 0 #3928
Comments
You need to provide a loader for svg files. Refer quilljs/webpack-example#8 for a sample webpack setup. There's also a documentation describing that: https://quilljs.com/guides/adding-quill-to-your-build-pipeline/, though it was written for 1.x.
Type declaration works for me (https://share.cleanshot.com/24TGwClp). If you have installed Having said that, it's reasonable to inline svg files for CJS/ESM setups so we may do that in the future versions so you don't need to handle SVG files in your bundler setups. |
Inline SVG files will greatly simplify using Quill. Importing SVG requires custom Webpack builder or custom esbuild loader in Angular 17 but I couldn't make it work. <button type="button" class="ql-bold" aria-pressed="false" aria-label="bold">/@fs/home/u/project/node_modules/quill/assets/icons/bold.svg</button> Relevant angular.json config: "architect": {
"build": {
"builder": "@angular-devkit/build-angular:application",
"options": {
"loader": {
".svg": "text"
}, |
Should be fixed by #3950 |
@pablopla Feel free to try it out with |
The entrypoint in Quill 2.0 Beta is probably wrong and the typescript types are missing.
I've tried to use
"main": "dist/quill.js"
instead of"main": "quill.js"
and add
"types": "quill.d.ts"
or"types": "types.d.js"
in package.json but it still doesn't work.https://github.com/quilljs/quill/blob/develop/packages/quill/package.json#L7
Steps for Reproduction
Expected behavior:
Use node_modules/quill/dist/quill.js and typescript types
Actual behavior:
Uses node_modules/quill.js without typescript types
Fail to load svg files:
Platforms:
Angular 17.0 project
Version:
v2.0.0-beta.0
The text was updated successfully, but these errors were encountered: