Fluent API for Webpack

Description

Webpack has a lot of features and can do a lot more than we usually use it for:

  • Code Splitting

  • Hashing

  • CSS / SASS

Now, we don't need to use all of those, but some of them (like code splitting) are super useful.

Additionally, calling `mix.webpack()` more than once tends to create issues.

We can make a fluent webpack api to add simple tasks like Extract Text or File Loader or anything like that.

Currently, we could do this by including extensions. The `coldbox-elixir-vue-2` extension does just this. But this could be easier.

Additionally, we could help out multiple `mix.webpack()` calls by merging the calls into one before passing it on to webpack.

Finally, the docs for webpack need to be updated to show the current best practices for usage.

Assignee

Unassigned

Reporter

Eric Peterson

Labels

None

Components

Priority

Major

Epic Name

Fluent API for Webpack
Configure