@@ -23,9 +23,12 @@ import { getPlugins } from '../plugin';
2323import { allSerial } from '../util/promise' ;
2424import { copyWeb } from '../web/copy' ;
2525
26+ import { inlineSourceMaps } from './sourcemaps' ;
27+
2628export async function copyCommand (
2729 config : Config ,
2830 selectedPlatformName : string ,
31+ inline = false ,
2932) : Promise < void > {
3033 if ( selectedPlatformName && ! ( await isValidPlatform ( selectedPlatformName ) ) ) {
3134 const platformDir = resolvePlatform ( config , selectedPlatformName ) ;
@@ -43,7 +46,7 @@ export async function copyCommand(
4346 const platforms = await selectPlatforms ( config , selectedPlatformName ) ;
4447 try {
4548 await allSerial (
46- platforms . map ( platformName => ( ) => copy ( config , platformName ) ) ,
49+ platforms . map ( platformName => ( ) => copy ( config , platformName , inline ) ) ,
4750 ) ;
4851 } catch ( e ) {
4952 if ( isFatal ( e ) ) {
@@ -58,6 +61,7 @@ export async function copyCommand(
5861export async function copy (
5962 config : Config ,
6063 platformName : string ,
64+ inline = false ,
6165) : Promise < void > {
6266 await runTask ( c . success ( c . strong ( `copy ${ platformName } ` ) ) , async ( ) => {
6367 const result = await checkWebDir ( config ) ;
@@ -134,6 +138,9 @@ export async function copy(
134138 } else {
135139 throw `Platform ${ platformName } is not valid.` ;
136140 }
141+ if ( inline ) {
142+ await inlineSourceMaps ( config , platformName ) ;
143+ }
137144 } ) ;
138145
139146 await runPlatformHook (
0 commit comments