0

In Webpack 5, I need to have the chunks that belong to a cacheGroup named so they can be grouped together due to a quirk in our content system.

So what I want do do is something like:

splitChunks: {
  cacheGroups: {
    something: {
      test: /\/(something)/,
      chunks: 'all',
      filename: 'something.[chunkhash].js'
    },
  }
}

The problem is any entry files created for the cacheGroup are also name something.[chunkhash].js making not possible to tell which one is the entry.

What I would really like yo do is have my entry named something.js and my chunks something.[chunkhash].js, but I haven't been able to figure it out.

Any ideas?

marcusds
  • 784
  • 1
  • 7
  • 26

0 Answers0