webpack无法阅读财产' call'未定义的

时间:2018-04-11 05:57:08

标签: javascript reactjs npm webpack

我一直在使用webpacknode作为我的反应。

我的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

0 个答案:

没有答案