omit.js
omit.js copied to clipboard
Acts weird when using with webpack
When bundling with webpack.
// import omit from 'omit.js'; <== works
// const omit = require('omit.js').default; <== works
// const omit = require('omit.js'); <== does NOT work
console.log(omit({ foo: 'foo', bar: 'bar' }, ['bar']));
May just want to better support commonjs - if a library uses this package internally and requires it via require('omit.js') - and then webpack is used to bundle the lib omit will always be undefined.
I ran into this issue when trying to bundle cabin with webpack and omit would always be undefined. The author switched to lodash/omit to remedy the issue.