-
Notifications
You must be signed in to change notification settings - Fork 111
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
Custom Build Failed To Load in Production #20
Comments
Hi, @rivernews The problem is somehow related to the ES6 code of our builds and the If you use ES5 builds, the problem doesn't exist anymore (https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/advanced-setup.html#option-building-to-es5-target). |
Yes, after I follow the link you provide to build to ES5, I can use the editor in production now. While its size is larger at least it works. If I turn off aot in Like you said the official I'm still pretty new to webpack, so please point me out if I ask some stupid questions.. In my
and in
Anyway, thanks for pointing me to the right resources. |
It's probably due to the fact, that webpack is configured to transpile only source files and leave files from |
Based on what you mentioned I can see a workaround is to publish private package to npm and use it in the project. That's very good to know! While it still might not be a preferred "standard" way to do it, it is now using ES6 directly produced by ckeditor custom build. |
I've battled with that error a bit more and here're my thoughts: The original error comes from the I've checked that using |
Versions
Browser: Chrome Version 67.0.3396.99 (Official Build) (64-bit)
OS: macOS High Sierra 10.13.4
@angular/cli 6.0.7
Node: 10.0.0
NPM: 5.6.0
Click to see complete results of `npm outdated`
Package Current Wanted Latest Location
@angular-devkit/build-angular 0.6.3 0.6.8 0.7.2 frontend
@angular/animations 6.0.3 6.1.1 6.1.1 frontend
@angular/cdk 6.3.0 6.4.2 6.4.2 frontend
@angular/cli 6.0.7 6.1.2 6.1.2 frontend
@angular/common 6.0.3 6.1.1 6.1.1 frontend
@angular/compiler 6.0.3 6.1.1 6.1.1 frontend
@angular/compiler-cli 6.0.3 6.1.1 6.1.1 frontend
@angular/core 6.0.3 6.1.1 6.1.1 frontend
@angular/flex-layout 6.0.0-beta.15 6.0.0-beta.17 6.0.0-beta.17 frontend
@angular/forms 6.0.3 6.1.1 6.1.1 frontend
@angular/http 6.0.3 6.1.1 6.1.1 frontend
@angular/language-service 6.0.3 6.1.1 6.1.1 frontend
@angular/material 6.3.0 6.4.2 6.4.2 frontend
@angular/platform-browser 6.0.3 6.1.1 6.1.1 frontend
@angular/platform-browser-dynamic 6.0.3 6.1.1 6.1.1 frontend
@angular/pwa 0.6.8 0.6.8 0.7.2 frontend
@angular/router 6.0.3 6.1.1 6.1.1 frontend
@angular/service-worker 6.1.0 6.1.1 6.1.1 frontend
@types/jasmine 2.8.7 2.8.8 2.8.8 frontend
@types/node 8.9.5 8.9.5 10.5.7 frontend
@types/tinycolor2 1.4.0 1.4.1 1.4.1 frontend
codelyzer 4.2.1 4.2.1 4.4.3 frontend
core-js 2.5.6 2.5.7 2.5.7 frontend
jasmine-core 2.99.12.99.1 3.1.0 frontend
karma 1.7.1 1.7.1 2.0.5 frontend
karma-coverage-istanbul-reporter 1.4.3 1.4.3 2.0.1 frontend
karma-jasmine-html-reporter 0.2.2 0.2.2 1.2.0 frontend
protractor 5.3.2 5.3.2 5.4.0 frontend
rxjs 6.2.0 6.2.2 6.2.2 frontend
rxjs-compat 6.0.0-beta.1 6.0.0-beta.1 6.2.2 frontend
ts-node 5.0.1 5.0.1 7.0.0 frontend
tslint 5.9.1 5.9.1 5.11.0 frontend
typescript 2.7.2 2.7.2 3.0.1 frontend
What I've Done
1. Followed instructions in readme to setup ckeditor5-angular
Did
npm install --save-dev @ckeditor/ckeditor5-angular
, setupallowJs
intsconfig.json
, includedCKEditorModule
inapp.module.ts
2. Refer to #6 to do a custom build and use it
ckeditor.js
under angular'sassets/
In my component
ts
file:The component's template:
3. Build angular
ng build --prod
Result
Editor box not showing and have error in console.
console.log
printed out whatCustomBalloonEditor
is:But immediately after that an error follows in console:
Click to see complete error stack
The error only occurs when in production. It will run w/o error if I just do
ng build
. (The editor insample/index.html
inckeditor5-build-balloon
's repo also works fine).I also tried to put
src/assets/ckeditor.js
inangular.json
inside the"scripts":[]
array but with no luck. Any idea would be appreciated. Thanks!The text was updated successfully, but these errors were encountered: