Skip to content

Commit

Permalink
chore: strip bundles deepmerge even more
Browse files Browse the repository at this point in the history
  • Loading branch information
pimlie committed Sep 17, 2019
1 parent 9d14387 commit 398d1af
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion scripts/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,21 @@ function rollupConfig({
'const polyfill = process.env.NODE_ENV === \'test\'': 'const polyfill = true',
'process.env.VERSION': `"${version}"`,
'process.server' : isBrowserBuild ? 'false' : 'true',
/* remove unused stuff from deepmerge */

// remove react stuff from is-mergeable-object
'|| isReactElement(value)': '|| false'
'|| isReactElement(value)': '|| false',
// we always provide an arrayMerge, remove default
'|| defaultArrayMerge' : '',
// we dont provide a custom merge
'options.clone' : 'false',
// we dont provide a custom merge
'options.customMerge' : 'false',
// dont use this
'deepmerge.all = ' : 'false; ',
// we know we will only merge objects together
'sourceIsArray = ' : 'sourceIsArray = false;',
'targetIsArray = ' : 'targetIsArray = false;'
}
}

Expand Down

0 comments on commit 398d1af

Please sign in to comment.