Browse Source

check for moduleName option when exporting from UMD bundle

contingency-plan
Rich-Harris 10 years ago
parent
commit
28566475a5
  1. 4
      src/finalisers/umd.js

4
src/finalisers/umd.js

@ -2,6 +2,10 @@ import { has } from '../utils/object';
import { getName, quoteId, req } from '../utils/map-helpers';
export default function umd ( bundle, magicString, exportMode, options ) {
if ( exportMode !== 'none' && !options.moduleName ) {
throw new Error( 'You must supply options.moduleName for UMD bundles' );
}
const indentStr = magicString.getIndentString();
const globalNames = options.globals || {};

Loading…
Cancel
Save