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
Research Webpacks DLL plugin #8398
Comments
An comparison of a build size using webpack DLL: https://www.drupal.org/project/drupal/issues/2966864#comment-13056870.
|
I've bootstrapped a configuration on 8398 branch. The next steps with it would be:
Let's not focus on the This should validate that we can use DLL for this kind of features. |
@pomek expanded the above demo by adding
We achieved so far: <script src="../dll-build/build/ckeditor.dll.js"></script>
<script src="./build/app.js"></script>
Current limitations:
new webpack.DllReferencePlugin( {
// The manifest file must be available at compile time.
manifest: require( '../dll-build/build/ckeditor-manifest.json' ),
// This can be anything, not related to the DLL itslef.
scope: '@ckeditor/ckeditor5-dll'
} )
To run the demo from 8398 branch:
|
OK, I checked the code and it looks indeed promising. Two things that we could check to verify it further:
|
I'd go with multi-DLL builds. In other words, each optional plugin must be built against the main DLL. We should check this as a next step. I think that we could explore a setup:
The drawback I could see from this approach is that you'd have to include 4 files:
With this one, I've struggled a bit. At the moment the best I could do is using exposed DLL to require it (#8399 (comment)). However, it is not very nice: window.CKEditor5DLL( './src/index.js' ).ClassicEditor.create() However, I saw that we attach something to the window anyway, so it should be doable to have only |
The very crud POC of the above is here: ckeditor5/dll/dll-plugin/index.html Lines 126 to 149 in 582fbe1
|
🎉 This one looks promising and will be carried on in #8517. |
Provide a description of the task
Research the feasibility of using Webpack's DLL plugin. in order to enable #8395.
Requirements to met:
core
,engine
,utils
<EmitterMixin
>,ui
).widget
,clipboard
, ... ).The text was updated successfully, but these errors were encountered: