前言
引入导致,因为webpackMerge的却不是一个函数呀~
内容
?> 正确示范
代码语言:javascript复制const webpackMerge = require('webpack-merge')
module.exports = webpackMerge.merge(webpackBaseConfig, webpackProdConfig)
# 直接引用merge函数
const { merge } = require('webpack-merge')
module.exports = merge(webpackBaseConfig, webpackProdConfig)
!> 错误示范
代码语言:javascript复制const webpackMerge = require('webpack-merge')
module.exports = webpackMerge(webpackBaseConfig, webpackProdConfig)