diff --git a/src/parseUtils.js b/src/parseUtils.js index 16adbe02..f137be2a 100644 --- a/src/parseUtils.js +++ b/src/parseUtils.js @@ -86,8 +86,8 @@ function parseBundle(bundlePath) { } function isArgumentContainsChunkIds(arg) { - // Array of numeric ids - return (arg.type === 'ArrayExpression' && _.every(arg.elements, isNumericId)); + // Array of numeric or string ids. Chunk IDs are strings when NamedChunksPlugin is used + return (arg.type === 'ArrayExpression' && _.every(arg.elements, isModuleId)); } function isArgumentContainsModulesList(arg) { diff --git a/test/bundles/validExtraBundleWithNamedChunk.js b/test/bundles/validExtraBundleWithNamedChunk.js new file mode 100644 index 00000000..e665944c --- /dev/null +++ b/test/bundles/validExtraBundleWithNamedChunk.js @@ -0,0 +1 @@ +webpackJsonp(["app"],{125:function(n,e,t){console.log("it works");}},[125]); diff --git a/test/bundles/validExtraBundleWithNamedChunk.modules.json b/test/bundles/validExtraBundleWithNamedChunk.modules.json new file mode 100644 index 00000000..54963ce9 --- /dev/null +++ b/test/bundles/validExtraBundleWithNamedChunk.modules.json @@ -0,0 +1,5 @@ +{ + "modules": { + "125": "{console.log(\"it works\");}" + } +}