Webpack is stuck with DllReferencePlugin


▀ ╢░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▀ ╢░░░░░░░░░░░░░░░░░░░░░ 75%% advanced module optimization

It’s stuck at this step.

My manifest file

{
  "name": "vendor_867d96888e41897a2594",
  "content": {
    "./node_modules/deep-equal/index.js": 140,
    "./node_modules/deep-equal/lib/is_arguments.js": 141,
    "./node_modules/deep-equal/lib/keys.js": 142,
    "./node_modules/fbjs/lib/EventListener.js": 74,
    "./node_modules/fbjs/lib/ExecutionEnvironment.js": 7,
    "./node_modules/fbjs/lib/camelize.js": 143,
    "./node_modules/fbjs/lib/camelizeStyleName.js": 144,
    "./node_modules/fbjs/lib/containsNode.js": 145,
    "./node_modules/fbjs/lib/createArrayFromMixed.js": 146,
    "./node_modules/fbjs/lib/createNodesFromMarkup.js": 147,

webpack config

import manifest from './build/manifest.vendor.json'

    new webpack.DllReferencePlugin({
      context: process.cwd(),
      manifest
    }),

webpack: 2 beta 20

Author: Fantashit

1 thought on “Webpack is stuck with DllReferencePlugin

  1. @TheLarkInn
    The root cause is because I used a function to pass the parameter to getComponent.
    But webpack uses static analysis (based on AST) to analyze modules, so it will never works as my expectation.

    const loadRoute = cb => module => cb(null, module.default)
    const errorLoading = error => `Dynamic page loading failed ${error}`
    
    const lazyLoad = component => (location, cb) => System.import(`${component}`).then(loadRoute(cb)).catch(errorLoading)
    
    export default (
      <Route path="/" component={Layout}>
        <IndexRoute getComponent={lazyLoad('./pages/Home')} />
    

    So, just have to change to:

    const loadModule = cb => module => cb(null, module.default)
    const errorLoading = error => `Dynamic page loading failed ${error}`
    
    export default {
      path: '/',
      component: Layout,
      onEnter(nextState, replace) {
        replace('/home')
      },
      childRoutes: [
        {
          path: 'home',
          getComponent(nextState, cb) {
            System.import('./pages/Home').then(loadModule(cb)).catch(errorLoading)
          }
        },
    

Comments are closed.