-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Migration guide from v10.0.0 to v11.0.0 #1136
Labels
type:docs
This issue reports a task related to documentation (e.g. an idea for a guide).
Milestone
Comments
Reinmar
added
status:confirmed
type:docs
This issue reports a task related to documentation (e.g. an idea for a guide).
labels
Jul 5, 2018
Reinmar
changed the title
Write a migration guide for v11.0.0
Write a migration guide from v10.0.0 to v11.0.0
Jul 5, 2018
Reinmar
changed the title
Write a migration guide from v10.0.0 to v11.0.0
Migration guide from v10.0.0 to v11.0.0
Jul 18, 2018
I updated the first message with a first draft of the migration guide. It's not complete yet. I'll work on it tomorrow. |
OK, I think we can close this ticket by now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We migrated from
webpack@3
towebpack@4
which means major changes inwebpack.config.js
and new major releases of CKEditor 5 build tools.We also changed the structure of build repositories which means that upgrading your custom builds will not be a no-brainer this time.
Upgrading your custom build
The changes which we have done to the structure of build repositories touched all the files and if you maintain your custom build, merging changes from the upstream is not feasible due to the number of conflicts. Instead, we recommend starting from the
stable
branch of the original build repository and applying your customizations once again.What changes?
build-config.js
is goneWe completely removed the
build-config.js
file. Its job is now fully taken over by thesrc/ckeditor.js
file.Prior to v11.0.0 both files existed at the same time. The
src/ckeditor.js
file was automatically created frombuild-config.js
by thenpm run build
command. Then,src/ckeditor.js
was passed via webpack to producebuild/ckeditor.js
. This meant that the configuration of a build was duplicated.Right now, your build's configuration is kept in one place —
src/ckeditor.js
. This file is a proper JavaScript module so it's also more flexible than the declarativebuild-config.js
.The Updating build configuration section describes modifying this file. You can also find more examples in Installing plugins.
npm run build
's job is to callwebpack --production
Previously the
npm run build
script had to producesrc/ckeditor.js
file and then call webpack. Right now, its job is trivial: it callswebpack --production
.Upgrade to webpack 4
Besides changing the structure of build source repositories, we also decided to finally migrate to webpack 4. webpack 4 was released in February, however, it brought a good number of breaking changes so we decided to stick to webpack 3 until this situation stabilizes.
The situation clarified recently so we decided to make the move in v11.0.0. This required releasing new versions of
@ckeditor/ckeditor5-dev-utils
and@ckeditor/ckeditor5-dev-webpack-plugin
as well as updating the existingwebpack.config.js
files.If, previously, you didn't have to change webpack's configuration, then it means that you won't need to do that now either. However, please note that:
devDependencies
section of a build'spackage.json
changed significantly. Nearly all packages had major releases, some were removed and some added. You can check all the changes in this diff. Make sure torm -rf node_modules/ && npm i
.webpack.config.js
itself. From the most important changes we replacedbabel-minify-webpack-plugin
with the theuglifyjs-webpack-plugin
plugin which is the default choice of webpack 4 .ModuleConcatenationPlugin()
became part of the officialproduction
mode so we could remove it. You can check the diff.src/ckeditor.js
changed, tooWe noticed that those of you who chose to modify that file instead of
build-config.js
had problems with the structure of theEditor.build
property. We decided to split it into two separate properties:Editor.builtinPlugins
andEditor.defaultConfig
.You can check what it meant to
src/ckeditor.js
in this diff.Summary
We squeezed all these changes in one CKEditor 5 release because we hope that it will be easier for you to make the upgrade once. We believe that these changes were worth the effort and made builds easier to understand and maintain.
Upgrading CKEditor 5 installed from source
If you integrated CKEditor 5 from source into your application and want to upgrade CKEditor 5 to version 11.0.0 it's recommended that you upgrade webpack to version 4. The latest release of CKEditor 5 was built with this version of webpack. Building it with webpack 3 should still be possible, but upgrading to webpack 4 will be safer.
webpack 4 was released in February, however, it brought a good number of breaking changes so we decided to stick to webpack 3 until this situation stabilizes.
The situation clarified recently so we decided to make the move in v11.0.0. This required releasing new versions of
@ckeditor/ckeditor5-dev-utils
and@ckeditor/ckeditor5-dev-webpack-plugin
as well as updating the existingwebpack.config.js
files.We will update this guide with a description of changes that you may need to do to upgrade to webpack 4 soon. For now, please check out how
webpack.config.js
changed in one of the builds and how thedependencies
changed.The text was updated successfully, but these errors were encountered: