webpack-merge merge is not a function
I use a ES6 webpack config, so I use [email protected] ...
import merge from "webpack-merge"
As from version 5 of webpack-merge, the merge function is now named export instead of a default export.
Before version 5
const merge = require('webpack-merge');
From version 5
const merge = require('webpack-merge').merge;
// or
const { merge } = require('webpack-merge');
If you are using ES modules, then you should do as:
import { merge } from "webpack-merge"
In a new version of webpack-merge, It is imported like below.
const { merge } = require('webpack-merge');