Skip to content

Webpack 3 bundle OccurrenceOrderPlugin error #5131

@lnked

Description

@lnked

Do you want to request a feature or report a bug?
Bug

What is the current behavior?

TypeError: m.forEachChunk is not a function
    at modules.forEach.m (/Users/edik/web/react-starter.dev/node_modules/webpack/lib/optimize/OccurrenceOrderPlugin.js:26:8)
    at Array.forEach (native)
    at Compilation.compilation.plugin (/Users/edik/web/react-starter.dev/node_modules/webpack/lib/optimize/OccurrenceOrderPlugin.js:23:13)
    at Compilation.applyPlugins1 (/Users/edik/web/react-starter.dev/node_modules/tapable/lib/Tapable.js:75:14)
    at sealPart2 (/Users/edik/web/react-starter.dev/node_modules/webpack/lib/Compilation.js:595:9)
    at Compilation.applyPluginsAsyncSeries (/Users/edik/web/react-starter.dev/node_modules/tapable/lib/Tapable.js:131:46)
    at Compilation.seal (/Users/edik/web/react-starter.dev/node_modules/webpack/lib/Compilation.js:580:8)
    at /Users/edik/web/react-starter.dev/node_modules/webpack/lib/Compiler.js:510:16
    at /Users/edik/web/react-starter.dev/node_modules/tapable/lib/Tapable.js:225:11
    at _addModuleChain (/Users/edik/web/react-starter.dev/node_modules/webpack/lib/Compilation.js:482:11)
    at processModuleDependencies.err (/Users/edik/web/react-starter.dev/node_modules/webpack/lib/Compilation.js:453:13)
    at _combinedTickCallback (internal/process/next_tick.js:73:7)
    at process._tickCallback (internal/process/next_tick.js:104:9)

If the current behavior is a bug, please provide the steps to reproduce.
Tested on:
/lnked/react-starter/

See fastest branch:
/lnked/react-starter/tree/fastest

Run npm run build

What is the expected behavior?
I wanted to improve bundle size

Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.
macOS 10.12.5
Node 6.11.0
Everything else in package.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions