TypeError: webpackMerge is not a

2020-08-07  本文已影响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); 
上一篇下一篇

猜你喜欢

热点阅读