-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Bundling #187
Comments
That's a sad bit. I've heard that there's no ES6 minifier yet. Can you tell which ES6 features need to be converted to ES5 before getting minified? |
As for the entry point for Rollup, we're now working on getting rid of |
We decided to fully transpile code by babel to make it more cross browser. Thanks to this we don’t have a problem with JS minificators/manglers which not fully supports ES6 syntax. |
It is worth leaving a note about problem I had with babel. I think that babel documentation is not clear in this subject. So... We use generators so we had to do something more than only transpile code with
And it works fine. If we transpile code with
And here is a problem. Babel with
Looks like runtime helpers should be loaded by application, but we don't want it. We need to create independent bundle. But we are using rollup and babel plugin for rollup, so we can try to force rollap to include those helpers. To do it we need two other plugins rollup-plugin-commonjs and rollup-plugin-node-resolve. With those plugins, rollap includes missing helpers but... in wrong order 😞 . Finally I figured out pretty simple (maybe not perfectly elegant) solution. I didn't use |
Thanks for the summary! May turn to be really helpful. |
It looks like we'll want to extract this task to a separate package (see #215). Which actually makes perfect sense considering that we'll have many bundlers for many environments. This one would be |
We need to bundle whole editor files into two files:
ckeditor.js
andckeditor.css
. For JS bundling we decided to useRollup
with tree-shaking option (inlcludes only uses library code instead of whole library). CSS file is already bundled (builded theme has only one CSS file), but we still need to minify it.It seems to be pretty easy, but:
CKEDITOR.create
function. Something like that:The text was updated successfully, but these errors were encountered: