我一直在使用webpack
和node
作为我的反应。
我的webpack.config.js看起来像这样
new ExtractTextPlugin({
filename: 'css/[contenthash].css',
allChunks: true
}),
/* extract vendor files into chunk */
new webpack.optimize.CommonsChunkPlugin({
name: "vendor",
minChunks: module => module.context && module.context.indexOf('node_modules') !== -1
}),
/* extract webpack runtime into manifest to avoid the manifest being exported into the vendor output */
new webpack.optimize.CommonsChunkPlugin({
name: "manifest",
chunks: ["main", "vendor"],
minChunks: Infinity
})
当我运行npm start
时,我的控制台上出现以下错误。
Uncaught TypeError: Cannot read property 'call' of undefined
at __webpack_require__ (manifest.js:53)
at Object.<anonymous> (main.js:5)
at __webpack_require__ (manifest.js:53)
at webpackJsonpCallback (manifest.js:24)
at main.js:1
__webpack_require__ @ manifest.js:53
(anonymous) @ main.js:5
__webpack_require__ @ manifest.js:53
webpackJsonpCallback @ manifest.js:24
(anonymous) @ main.js:1