src/license-plugin.js
function fixSourceMapOptions(options) {
  // Rollup <= 0.48 used `sourceMap` in camelcase, so this plugin used
  // this convention at the beginning.
  // Now, the `sourcemap` key should be used, but legacy version should still
  // be able to use the `sourceMap` key.
  const newOptions = _.omitBy(options, (value, key) => (
    key === 'sourceMap'
  ));

  // If the old `sourceMap` key is used, set it to `sourcemap` key.
  if (_.hasIn(options, 'sourceMap')) {
    console.warn(`[${PLUGIN_NAME}] sourceMap has been deprecated, please use sourcemap instead.`);
    if (!_.hasIn(newOptions, 'sourcemap')) {
      newOptions.sourcemap = options.sourceMap;
    }
  }

  // Validate options.
  validateOptions(newOptions);

  return newOptions;
}
function fixSourceMapOptions(options) {
  // Rollup <= 0.48 used `sourceMap` in camelcase, so this plugin used
  // this convention at the beginning.
  // Now, the `sourcemap` key should be used, but legacy version should still
  // be able to use the `sourceMap` key.
  const newOptions = _.omitBy(options, (value, key) => (
    key === 'sourceMap'
  ));

  // If the old `sourceMap` key is used, set it to `sourcemap` key.
  if (_.hasIn(options, 'sourceMap')) {
    console.warn(`[${PLUGIN_NAME}] sourceMap has been deprecated, please use sourcemap instead.`);
    if (!_.hasIn(newOptions, 'sourcemap')) {
      newOptions.sourcemap = options.sourceMap;
    }
  }

  // Validate options.
  validateOptions(newOptions);

  return newOptions;
}
function fixSourceMapOptions ( options ) { // Rollup <= 0.48 used `sourceMap` in camelcase, so this plugin used // this convention at the beginning. // Now, the `sourcemap` key should be used, but legacy version should still // be able to use the `sourceMap` key. const newOptions = _ . omitBy ( options , ( value , key ) => ( key === 'sourceMap' ) ) ; // If the old `sourceMap` key is used, set it to `sourcemap` key. if ( _ . hasIn ( options , 'sourceMap' ) ) { console . warn ( ` ${ PLUGIN_NAME } ` ) ; if ( ! _ . hasIn ( newOptions , 'sourcemap' ) ) { newOptions . sourcemap = options . sourceMap ; } } // Validate options. validateOptions ( newOptions ) ; return newOptions ; }
Fix option object, replace `sourceMap` with `sourcemap` if needed.

@param {Object} options Original option object.
@return {Object} The new fixed option object.
Fix option object replace sourceMap with sourcemap if needed .