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

Built-from-source React implementation doesn't work with Next.js #7343

Closed
sethcwhiting opened this issue May 29, 2020 · 1 comment
Closed
Labels
resolution:duplicate This issue is a duplicate of another issue and was merged into it.

Comments

@sethcwhiting
Copy link

Hi! First of all, thank you so much for all of your hard work on this project. I think your service could to save my team a lot of work!

Right now, we're trying to assess whether or not to use CKEdit for our project, which we're building on top of Next.js. We need to make use of the Comments and Tracked Changes add-ons you offer. I found this sample application you provide, and I'm currently trying to include it in our project, but I'm running into over 100 errors in my console, all relating to the same issue:

./node_modules/@ckeditor/ckeditor5-block-quote/theme/blockquote.css
Global CSS cannot be imported from within node_modules.
Read more: https://err.sh/next.js/css-npm
Location: node_modules/@ckeditor/ckeditor5-block-quote/src/blockquoteui.js

Following the link that Next provides in that error, the solution they propose is as follows:

Possible Ways to Fix It
Reach out to the maintainer and ask for them to publish a compiled version of their dependency.

Compiled dependencies do not have references to CSS files, or any other files that require bundler-specific integrations.

The dependency should also provide instructions about what CSS needs to be imported by you, in your application.

Importing CSS files within node_modules cannot be supported because we cannot know the correct behavior:

  • Should the file be consumed as Global CSS or CSS Modules?
  • If Global, in what order does the file need to be injected?
  • If Modules, what are the emitted class names? As-is, camel-case, snake case?
  • Etc...

As I said, we're at the point where trying to decide right now whether to spend several hundreds of dollars a month on your premium plugins or to spend several dozens of man hours trying to build something custom ourselves. If you could resolve this issue for us, it would make our decision - and the decision of any other teams trying to use your service with Next.js in the future - much easier.

Thanks again!


If you'd like to see this improvement implemented, add a 👍 reaction to this post.

@sethcwhiting sethcwhiting added the type:improvement This issue reports a possible enhancement of an existing feature. label May 29, 2020
@Mgsy
Copy link
Member

Mgsy commented Jun 4, 2020

Hi, thank you for the report. I've opened a feature request for Next.js integration, so let's move the discussion there.

@Mgsy Mgsy closed this as completed Jun 4, 2020
@Mgsy Mgsy added resolution:duplicate This issue is a duplicate of another issue and was merged into it. and removed type:improvement This issue reports a possible enhancement of an existing feature. labels Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution:duplicate This issue is a duplicate of another issue and was merged into it.
Projects
None yet
Development

No branches or pull requests

2 participants