Skip to content

DllPlugin & DllReferencePlugin docs #1121

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

Closed
wants to merge 13 commits into from
Closed

Conversation

aretecode
Copy link
Contributor

Feedback appreciated

@simon04
Copy link
Collaborator

simon04 commented Apr 18, 2017

🚀 Great to see progress on this big black hole in the documentation of webpack 2 (#944). Over the weekend, I was also working on finally getting the DllPlugin documented.

Firstly, don't worry about the failing Travis build (this is due to an edit link of the new markdown file not yet existing).

I see that this documentation is largely based on https://webpack.github.io/docs/list-of-plugins.html#dllplugin which seems a good start. Since the successful usage involves a correct configuration of DllPlugin, DllReferencePlugin as well as the use in the JavaScript code and HTML file, a few examples (for scoped, mapped mode, various output.library values) covering all parts would be of greatest help for the reader. I could think of the following structure of the documentation:

  • introduction (as it is)
  • configuration options for DllPlugin, DllReferencePlugin (as it is) w/o an example
  • a few examples showing two complete webpack configs plus minimal JavaScript files plus the inclusion in HTML file

The question is how much time you'd be willing to invest for this documentation/PR? So whether you'd like to get this merged quickly or you're up to working and polishing this docs for some time.

@aretecode
Copy link
Contributor Author

@simon04

yes, it is based on the old documentation, with a fair bit of updating.

thanks for the info about travis.

where are the docs you made for the dll plugin? we could merge them :-)

I had planned to add some examples to webpack/examples here https://github.com/webpack/webpack.js.org/pull/1121/files#diff-0dcb8884c3201edf1c374f1ea874abe3R76

I could port the two examples I have for my d-l-l lib https://github.com/fliphub/d-l-l/tree/master/examples ?

@simon04
Copy link
Collaborator

simon04 commented Apr 19, 2017

I stopped to write the docs right after I saw your PR. So there's not much to show. I summarised my ideas in my previous comment.

It would be good to have one simple+minimal example (I like this one https://gist.github.com/Eoksni/83d1f1559e0ec00d0e89c33a6d763049) which shows the basic usage. Altered examples should show the other modes (scoped, mapped mode), and how sourceType='commonjs2' is to be used.

Update this PR with some good examples and I'll review.

aretecode added a commit to aretecode/webpack that referenced this pull request Apr 19, 2017
🆕📘 added dll-example with a minimal multi-config setup (as suggested by @simon04 [here](webpack/webpack.js.org#1121 (comment)))
🙏 add simon04 to collaborators 
🛁 clean commented example
🔗🌽 link to example pull request
🔗 add more named links to other parts of the dll plugin & dll reference plugin source code
🌊👣  add TemplatePaths type for `name`
🔬 more source code test links
📘 add examples section
📘⎁⎂ descriptions for the examples, explain what functionality they demonstrate
@aretecode
Copy link
Contributor Author

@aretecode
Copy link
Contributor Author

@simon04
Copy link
Collaborator

simon04 commented Apr 19, 2017

Aside from links to webpack examples added, I don't see any changes in the page structure (see #1121 (comment)) nor a change in the documentation of scoped mode, mapped mode and how to use sourceType='commonjs2'.

@simon04 simon04 changed the title 🤸 🔌 📖 DllPlugin & DllReferencePlugin docs DllPlugin & DllReferencePlugin docs Apr 19, 2017
aretecode added a commit to aretecode/webpack that referenced this pull request Apr 19, 2017
🆕📘 added dll-app-and-vendor example with a minimal multi-config setup (as suggested by @simon04 [here](webpack/webpack.js.org#1121 (comment)))

The `DllPlugin` and `DllReferencePlugin` provide means to split bundles in a way that can drastically improve build time performance.

[DllPlugin](#DllPlugin) is used in a separate webpack config exclusively to create a dll-only-bundle. It creates a `manifest.json` file, which used by the [DllReferencePlugin](#DllReferencePlugin) to map dependencies.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which used -> which is used

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

🏛️ update structure as suggested by @simon04 [here](webpack#1121 (comment))
⚒⌨️ fix typo found by @smashercosmo webpack#1121 (review)
📘 added dll-example using `libraryTarget` + `sourceType` `"commonjs2"` to create a vendor bundle, and a dependency bundle, on nodejs. 
📝 remove completed todos
@aretecode
Copy link
Contributor Author

@simon04 any thoughts? has been updated

@skipjack skipjack requested a review from simon04 April 23, 2017 04:42
@skipjack
Copy link
Collaborator

skipjack commented Apr 23, 2017

@aight8 any thoughts on this? I know you brought it up in #944 which can probably be closed once this is merged.

aretecode added a commit to aretecode/webpack that referenced this pull request Apr 25, 2017
🆕📘 added dll-app-and-vendor example with a minimal multi-config setup (as suggested by @simon04 [here](webpack/webpack.js.org#1121 (comment)))
@simon04
Copy link
Collaborator

simon04 commented Apr 28, 2017

Since this PR references many not-yet-merged webpack examples, the Travis CI fails (HTTP 404). Feel free to drop those examples for now and submit another PR later.

I won't review unless the CI succeeds. Also please make sure to read and follow https://webpack.js.org/writers-guide/#typesetting.

@skipjack
Copy link
Collaborator

@aretecode please re-open once you've rebased and dealt with the conflicts (or just open a new pr).

@skipjack skipjack closed this May 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants