diff --git a/index.js b/index.js index e468737..46df5d9 100644 --- a/index.js +++ b/index.js @@ -98,6 +98,9 @@ AssetsWebpackPlugin.prototype = { let added = false const typeMap = assets.reduce(function (typeMap, obj) { const asset = obj.name || obj + + console.log(asset) + if (isHMRUpdate(options, asset) || isSourceMap(options, asset) || (!chunkName && seenAssets[asset])) { return typeMap } diff --git a/lib/isHMRUpdate.js b/lib/isHMRUpdate.js index 3d91839..28a052d 100644 --- a/lib/isHMRUpdate.js +++ b/lib/isHMRUpdate.js @@ -1,6 +1,8 @@ const pathTemplate = require('./pathTemplate') module.exports = function isHMRUpdate (options, asset) { + if (asset.includes('.hot-update.')) return true + const hotUpdateChunkFilename = options.output.hotUpdateChunkFilename const hotUpdateTemplate = pathTemplate(hotUpdateChunkFilename) return hotUpdateTemplate.matches(asset) diff --git a/package.json b/package.json index 49d1987..bf24e05 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "assets-webpack-plugin", - "version": "6.0.0-alpha.4", + "version": "6.0.0-alpha.5", "description": "Emits a json file with assets paths", "main": "dist/index.js", "engines": {