chunk-splitting-plugin icon indicating copy to clipboard operation
chunk-splitting-plugin copied to clipboard

Compatibility with webpack 4

Open SamyPesse opened this issue 6 years ago • 1 comments

When trying to use this plugin with webpack v4, I'm getting the error:

const async = !chunk.isInitial()
                         ^

TypeError: chunk.isInitial is not a function
    at chunk (/Users/samypesse/Projects/GitBook/gitbook-new/node_modules/chunk-splitting-plugin/ChunkSplittingPlugin.js:156:26)
    at arrayMap (/Users/samypesse/Projects/GitBook/gitbook-new/node_modules/lodash/lodash.js:660:23)
    at map (/Users/samypesse/Projects/GitBook/gitbook-new/node_modules/lodash/lodash.js:9571:14)
    at flatMap (/Users/samypesse/Projects/GitBook/gitbook-new/node_modules/lodash/lodash.js:9274:26)
    at breakChunksIntoPieces (/Users/samypesse/Projects/GitBook/gitbook-new/node_modules/chunk-splitting-plugin/ChunkSplittingPlugin.js:155:10)

SamyPesse avatar Jun 20 '18 08:06 SamyPesse

Hi @SamyPesse. I am aware of the issue. I do not currently have time to migrate the plugin to Webpack 4. I'm open to PRs that do so, though.

Thanks for understanding.

niieani avatar Jun 21 '18 13:06 niieani