webpack / webpack/webpack.js.org
Doc Request: Strategies for structuring configuration
Nobody has claimed this yet.
- Dominant language
- MDX
- Stars
- 2.3k
- Forks
- 3.4k
- Avg merge
- 13h 32m
- Merged PRs (30d)
- 71
Description
Request: Expand the configuration section of the docs to include a few concrete examples/approaches/strategies/practical tips for how to structure a complex webpack configuration well.
Related issue (old): #870
The configuration section lists a few good starting tips and also says:
The most important part to take away from this document is that there are many different ways to format and style your webpack configuration. The key is to stick with something consistent that you and your team can understand and maintain.
For less complex configurations I feel this is doable, but for complex setups I find this hard to achieve in practice.
If it's helpful, there are two tradeoffs I can think of that I especially struggle with:
- Having several targets (server, modern browsers, older browsers) as well as several modes (dev, test, prod) creates a kind of multi-dimensional configuration that no matter how I try to cut it, it's hard to understand and maintain.
- Being able to easily review and understand the entire configuration vs splitting it up into smaller maintainable pieces, I never quite seem to find a balance.
All projects are different and complex configurations are usually complex because the requirements are, so I'm not sure this is easily addressable in the docs, but a few more pointers wouldn't hurt. :)
Thanks for the already awesome docs and all your hard work! 👏 👏 👏
This issue was moved from webpack/webpack#8475 by @montogeek. Original issue was by @Ephem.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the configuration section in the webpack documentation and review related issue #870 for prior context. Define concrete guidance and examples for structuring complex configurations across multiple targets and modes, including the tradeoff between a unified configuration and split files. Done means the configuration docs contain practical, maintainable strategies for these cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100