ckeditor5-vue icon indicating copy to clipboard operation
ckeditor5-vue copied to clipboard

Reconsider the `transpileDependencies` option in vue.config.js

Open ma2ciek opened this issue 5 years ago • 5 comments

This configuration is present here: https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/frameworks/vuejs.html#configuring-vueconfigjs

I see two issues with the above configuration:

  1. Should we transpile all CKEditor5 code to ES5? It produces much larger builds and we don't do it by default in our CKEditor 5 builds, it's not mandatory.

  2. The /ckeditor5-[^/\\]+[/\\]src[/\\].+\.js$/ won't match our collaboration repositories, it'd change it to something more like @ckeditor[/\\]ckeditor5?-[^/\\]+[/\\]src[/\\].+\.js$/

ma2ciek avatar Apr 23 '19 12:04 ma2ciek

  • Should we transpile all CKEditor5 code to ES5? It produces much larger builds and we don't do it by default in our CKEditor 5 builds, it's not mandatory.

Ideally, if we can avoid transpiling that, that'd be best.

2. The /ckeditor5-[^/\\]+[/\\]src[/\\].+\.js$/ won't match our collaboration repositories, it'd change it to something more like @ckeditor[/\\]ckeditor5?-[^/\\]+[/\\]src[/\\].+\.js$/

Can't we simply change ckeditor5- to ckeditor5?-? What other pkg names we have to include besides ckeditor-cloud-services-core?

Reinmar avatar Jun 26 '19 15:06 Reinmar

I'm running into an issue that I think is related to this when I try to run tests on my Vue project using a customized editor and @ckeditor/ckeditor5-editor-classic. Everything works fine with npm run serve, but on npm run test:unit it does not even run the file anymore after switching from the @ckeditor/ckeditor5-build-classic which had no issues in testing. The error is:

Test suite failed to run
    <project>\node_modules\@ckeditor\ckeditor5-editor-classic\src\classiceditor.js:10
    import Editor from '@ckeditor/ckeditor5-core/src/editor/editor';
           ^^^^^^
    SyntaxError: Unexpected identifier
      at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/script_transformer.js:403:17)

I've got my vue.config.js set up according to the docs, and have tried messing around with the above suggestions and others, also tried some suggested changes for my transform and transformIgnorePatterns in my jest.config.js, but always get the same error.

Has this issue been encountered before?

k80oshea avatar Nov 14 '19 17:11 k80oshea

a year latter, and there is no solution for this one @k80oshea >.< i am having the same issue.

rafapaulin avatar Oct 21 '20 23:10 rafapaulin

still, nothing =/

rafapaulin avatar Jan 04 '21 14:01 rafapaulin

I can confirm this issue, getting the same error using npm run test:unit ... has anybody been able to run tests on a Vue-CLI project with CKeditor being built from source?

Update: Solved this, see https://github.com/ckeditor/ckeditor5-vue/issues/128#issuecomment-825503807

JarvisH avatar Apr 15 '21 08:04 JarvisH