美文网首页
TypeError: webpackMerge is not a

TypeError: webpackMerge is not a

作者: 王国的荣耀 | 来源:发表于2020-08-07 12:52 被阅读0次

    问题:如下webpack config js 出现: TypeError: webpackMerge is not a function

    const merge = require("webpack-merge");
    const baseConfig = require('./webpack.base.js'); // 引用公共配置
    
    // 将baseConfig和devConfig合并为一个配置
    module.exports = merge(devConfig, baseConfig); 
    

    修改为

    const WebpackMerge = require("webpack-merge");
    const baseConfig = require('./webpack.base.js'); // 引用公共配置
    
    // 将baseConfig和devConfig合并为一个配置
    module.exports = WebpackMerge.merge(devConfig, baseConfig); 
    

    相关文章

      网友评论

          本文标题:TypeError: webpackMerge is not a

          本文链接:https://www.haomeiwen.com/subject/vzlfdktx.html