Skip to content

Conversation

@yoannmoinet
Copy link

@yoannmoinet yoannmoinet commented Mar 17, 2020

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

Lately we split our webpack build in different processes.

So mini-css-extract-plugin was creating chunks named 1.min.css for different modules in each builds, overwriting the chunk from other builds. It just wasn't configured to add the hash to the name.

We configured it to add the hash to the name using the chunkFilename setting.

But, it named our common.min.css bundle as a chunk making it common.<hash>.min.css.

The issue is that we load this file explicitly in our templates, so we couldn't predict the new name.

A solution was to use a function for chunkFilename, just like webpack's configurations. But this plugin didn't support functions for this setting.

Breaking Changes

Not breaking.

Additional Info

@jsf-clabot
Copy link

jsf-clabot commented Mar 17, 2020

CLA assistant check
All committers have signed the CLA.

@alexander-akait
Copy link
Member

chunkFilename is soft deprecated for webpack@5

@yoannmoinet
Copy link
Author

What would be the correct process in webpack@5 then?

@alexander-akait
Copy link
Member

Supported (only webpack@5)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants