8000 Support for multiple webpack configs · Issue #48 · symfony/webpack-encore · GitHub
[go: up one dir, main page]

Skip to content
Support for multiple webpack configs #48
@stof

Description

@stof

Webpacks supports 3 different kinds of exports for its config:

  • a config object, which is what Encore generates
  • an array of config objects, which will then be similar to running webpack multiple times (once per config) but in a single run. This is handy when you want to isolate different shared entries entirely for instance.
  • a promise resolving to one of the previous format (handy to allow building the config asynchronously if you need to load it from elsewhere)

Encore does not need to do anything special to support promises. People needing this could simply use Encore inside their promise.

However, Encore currently cannot be used for the array case (at least not without accessing internal APIs). This is because the public API of Encore is currently built around a stateful singleton.
Note that all internal APIs are ready for that though, as they rely on a non-singleton WebpackConfig object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0