Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
Hashing entire un-named chunk instead of individual modules (#278)
Browse files Browse the repository at this point in the history
  • Loading branch information
eliperelman authored Jun 22, 2017
1 parent 7128bb3 commit ec7cf98
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/neutrino-middleware-chunk/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ module.exports = ({ config }) => config
.plugin('named-modules')
.use(NamedModulesPlugin).end()
.plugin('named-chunks')
.use(NamedChunksPlugin, [chunk => chunk.name || chunk.modules
.map(({ context = '', request = '' }) => hash(relative(context, request)))
.join('_')])
.use(NamedChunksPlugin, [
chunk => (
chunk.name ||
hash(chunk.modules.map(({ context = '', request = '' }) => relative(context, request)).join('_'))
)
])
.end()
.plugin('vendor-chunk')
.use(optimize.CommonsChunkPlugin, [{
Expand Down

0 comments on commit ec7cf98

Please sign in to comment.