webpack-chain
webpack-chain copied to clipboard
Document merge function import
Here https://github.com/mozilla-neutrino/webpack-chain#config-module-rules-uses-loaders-modifying-options the example says:
config.module
.rule('compile')
.use('babel')
.tap(options => merge(options, { plugins: ['babel-plugin-syntax-object-rest-spread'] }));
However it's not mentioned anywhere where merge
is supposed to come from. I believe that should be documented at least once.
I hope this should be documented. I imported merge
like const merge = require('deepmerge')
.
@eliperelman is this example referring to deepmerge's merge()
or that from babel-merge? I'm presuming the latter?
I left it as generic at the time so users could implement how they saw fit, but using babel-merge is probably the best way.