catamphetamine / webpack-isomorphic-tools

Server-side rendering for your Webpack-built applications (e.g. React)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CommonsChunkPlugin manifest load error

elevensky opened this issue · comments

this is my webpack config file

entry: {
    'main': [
      'webpack-hot-middleware/client?path=http://' + host + ':' + port + '/__webpack_hmr',
      './src/client.js'
    ],
    vendor: [
      'react',
      ...
    ]
  },
....
//about plugin:
new webpack.optimize.CommonsChunkPlugin({
  names: ['vendor', 'manifest']
}),
...
webpackIsomorphicToolsPlugin.development()

then i can get right file :
manifest-455455b9862b20aae523.js
main-455455b9862b20aae523.js
vendor-455455b9862b20aae523.js

but when i change some code, hash will change in webpack-assets.json file always.
and browser output some erro like this:

Uncaught TypeError: Cannot read property 'call' of undefined
  at __webpack_require__ (manifest-455455b….js:586)

I am not sure if there some problem with tools.

but when i change some code, hash will change in webpack-assets.json file always.

That's because you're using

output:
  filename: [name]-[hash].js
  chunkFilename: [name]-[hash].js

Every time any file is updated (js) the [hash] changes and therefore all filenames change

As for the browser error, there's not enough info on the error you provided.