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

Quill.js webpack integration in symfony project #4149

Closed
Marcelin97 opened this issue Apr 30, 2024 · 3 comments
Closed

Quill.js webpack integration in symfony project #4149

Marcelin97 opened this issue Apr 30, 2024 · 3 comments
Labels

Comments

@Marcelin97
Copy link

I'm encountering an issue while integrating Quill.js into my webpack setup. When trying to use Quill in my project, I'm getting the following error:

kotlin
Copy code
Uncaught Error: Module parse failed: Unexpected token (28:18)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|
| class Quill {

static DEFAULTS = {
| bounds: null,
| modules: {

It seems to be related to how webpack is handling Quill.js files, particularly with the static class field syntax used in Quill.
I use Webpack with Encore in my symfony project. (php 7.4 and symfony 5.4)

I've tried various configurations and searched for solutions online, but I'm still encountering this issue. Could someone please provide guidance on how to resolve this error and properly integrate Quill.js into my webpack setup?

Thanks in advance for your help!

@luin
Copy link
Member

luin commented May 1, 2024

We have a sample repo that demonstrates how to use Quill in a webpack project: https://github.com/quilljs/webpack-example.

@luin luin added the question label May 1, 2024
@Marcelin97
Copy link
Author

ok, but i have a symfony project with webpack and Encore.
Can you tell me what we need in my webpack.config.json or what module are necessary.

i have this error and i found nothing to help me :

`Uncaught Error: Module parse failed: Unexpected token (28:18)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|
| class Quill {

static DEFAULTS = {
| bounds: null,
| modules: {`

@luin
Copy link
Member

luin commented May 2, 2024

Quill is a frontend project so it has nothing to do with symfony. I think you may need a loader for JavaScript (e.g. babel) but it highly depends on your specific setup. The repo above is a full project that should include everything you would need.

Closing for now as it's not an issue

@luin luin closed this as completed May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants