Skip to content

CKEditor 5 build #1865

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

Closed
meneerprins opened this issue Jan 3, 2019 · 4 comments · Fixed by #2624
Closed

CKEditor 5 build #1865

meneerprins opened this issue Jan 3, 2019 · 4 comments · Fixed by #2624

Comments

@meneerprins
Copy link

meneerprins commented Jan 3, 2019

Before the latest webpacker update I could just use import BalloonEditor from '@ckeditor/ckeditor5-build-balloon'; but after the latest update I get an error:

"export 'default' (imported as 'BalloonEditor') was not found in '@ckeditor/ckeditor5-build-balloon'

Does anyone know how I can make the premade CKEditor 5 build work? The custom build seems too complicated.

Package: https://github.com/ckeditor/ckeditor5-build-balloon

@ansonhoyt
Copy link

ansonhoyt commented Jan 24, 2019

@meneerprins are you still having this problem?

I'm troubleshooting the same thing with @ckeditor/ckeditor5-build-classic. It was working for us on 4.0.0-pre.3 and I think it broke sometime before the rc builds.

I've tried fixing by re-installing 4.0.0-rc.5 with fresh configs (a lot have moved around) but no luck so far.

@ansonhoyt
Copy link

ansonhoyt commented Jan 24, 2019

It broke in e95dd72. That is a big commit, so I'm not sure which part 😕

I can do a clean install of 4.0.0-rc.5, use all the latest configs, then just downgrade to 99c0dd9:

Gemfile
-gem 'webpacker', '~> 4.0.0-rc.5'
+gem 'webpacker', git: 'https://github.com/rails/webpacker.git', ref: '99c0dd9'

package.json
-    "@rails/webpacker": "4.0.0-rc.5",
+    "@rails/webpacker": "https://github.com/rails/webpacker.git#99c0dd9",

...and CKEditor works

@ansonhoyt
Copy link

Thanks to #1903 (comment), this can be fixed by following the upgrade guide

I just had to update config/webpack/environment.js with:

const { environment } = require('@rails/webpacker')

+ environment.loaders.delete('nodeModules')

module.exports = environment

@meneerprins
Copy link
Author

Yes, I fixed it now with:

const nodeModulesLoader = environment.loaders.get('nodeModules');

if (!Array.isArray(nodeModulesLoader.exclude)) {
  nodeModulesLoader.exclude =
    nodeModulesLoader.exclude == null ? [] : [nodeModulesLoader.exclude];
}
nodeModulesLoader.exclude.push(/@ckeditor\/ckeditor5-build-balloon/);

jakeNiemiec added a commit to jakeNiemiec/webpacker that referenced this issue Jun 8, 2020
gauravtiwari pushed a commit that referenced this issue Jun 17, 2020
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

Successfully merging a pull request may close this issue.

2 participants