diff --git a/README.md b/README.md index 8d11dcd..5b767f0 100644 --- a/README.md +++ b/README.md @@ -94,11 +94,13 @@ const withPlugins = require('next-compose-plugins') const nextImg = require('next-img/plugin') module.exports = withPlugins([ - nextImg, - { - // specify the default breakpoints - breakpoints: [768], - }, + [ + nextImg, + { + // specify the default breakpoints + breakpoints: [768], + }, + ] ]) ``` diff --git a/lib/next-plugin/nextPlugin.js b/lib/next-plugin/nextPlugin.js index 115a0cc..37b9bde 100644 --- a/lib/next-plugin/nextPlugin.js +++ b/lib/next-plugin/nextPlugin.js @@ -47,7 +47,7 @@ const defaults = { * @returns {object} */ module.exports = function withImg(pluginConfig = {}, nextComposePlugins = {}) { - pluginConfig = deepmerge.all([{}, defaults, pluginConfig], { arrayMerge: overwriteMerge }) + pluginConfig = deepmerge.all([{}, defaults, pluginConfig], { arrayMerge: overwriteMerge, clone: false }) return { ...pluginConfig,