Skip to content

Commit ec265c6

Browse files
committed
Support specifying a standalone bundle or a bundle export name, not both
1 parent 3c494bb commit ec265c6

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

  • lib/node_modules/@stdlib/_tools/bundle/pkg-list/lib

lib/node_modules/@stdlib/_tools/bundle/pkg-list/lib/main.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,16 +152,17 @@ function bundle( pkgs, options, clbk ) {
152152
debug( 'Generating bundle...' );
153153
if ( opts.bundler === 'browserify' ) {
154154
bopts = {
155-
'externalRequireName': opts.requireName,
156-
'exportName': opts.exportName,
155+
'requireName': opts.requireName,
157156
'transforms': opts.transforms,
158157
'plugins': opts.plugins
159158
};
160-
if ( opts.external ) {
161-
bopts.external = opts.external;
162-
}
163159
if ( opts.standalone ) {
164160
bopts.standalone = opts.standalone;
161+
} else if ( opts.exportName ) {
162+
bopts.exportName = opts.exportName;
163+
}
164+
if ( opts.external ) {
165+
bopts.external = opts.external;
165166
}
166167
debug( 'Browserify options: %s', JSON.stringify( bopts ) );
167168
return browserifyString( out, bopts, onBundle );

0 commit comments

Comments
 (0)