Skip to content

Doc Request: Strategies for structuring configuration #2698

Description

@webpack-bot

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions