|
@ -3,7 +3,7 @@ import getInteropBlock from './shared/getInteropBlock.js'; |
|
|
import getExportBlock from './shared/getExportBlock.js'; |
|
|
import getExportBlock from './shared/getExportBlock.js'; |
|
|
import esModuleExport from './shared/esModuleExport.js'; |
|
|
import esModuleExport from './shared/esModuleExport.js'; |
|
|
|
|
|
|
|
|
export default function amd ( bundle, magicString, { exportMode, indentString, intro }, options ) { |
|
|
export default function amd ( bundle, magicString, { exportMode, indentString, intro, outro }, options ) { |
|
|
const deps = bundle.externalModules.map( quotePath ); |
|
|
const deps = bundle.externalModules.map( quotePath ); |
|
|
const args = bundle.externalModules.map( getName ); |
|
|
const args = bundle.externalModules.map( getName ); |
|
|
|
|
|
|
|
@ -28,7 +28,7 @@ export default function amd ( bundle, magicString, { exportMode, indentString, i |
|
|
const exportBlock = getExportBlock( bundle.entryModule, exportMode ); |
|
|
const exportBlock = getExportBlock( bundle.entryModule, exportMode ); |
|
|
if ( exportBlock ) magicString.append( '\n\n' + exportBlock ); |
|
|
if ( exportBlock ) magicString.append( '\n\n' + exportBlock ); |
|
|
if ( exportMode === 'named' && options.legacy !== true ) magicString.append( `\n\n${esModuleExport}` ); |
|
|
if ( exportMode === 'named' && options.legacy !== true ) magicString.append( `\n\n${esModuleExport}` ); |
|
|
if ( options.outro ) magicString.append( `\n${options.outro}` ); |
|
|
if ( outro ) magicString.append( outro ); |
|
|
|
|
|
|
|
|
return magicString |
|
|
return magicString |
|
|
.indent( indentString ) |
|
|
.indent( indentString ) |
|
|