@@ -420,7 +420,7 @@ async function pack(dir, output) {
420420 }
421421 const childs = fs . readdirSync ( root ) ;
422422 for ( const name of childs ) {
423- if ( name === '.' || name === '..' || name === 'index.bundlejs.map' ) {
423+ if ( name === '.' || name === '..' || name === 'index.bundlejs.map' || name === 'index.bundlejs.txt.map' ) {
424424 continue ;
425425 }
426426 const fullPath = path . join ( root , name ) ;
@@ -814,14 +814,14 @@ export const commands = {
814814 options . platform || ( await question ( '平台(ios/android/harmony):' ) ) ,
815815 ) ;
816816
817- const { bundleName, entryFile, intermediaDir, output, dev } =
817+ const { bundleName, entryFile, intermediaDir, output, dev, sourcemap } =
818818 translateOptions ( {
819819 ...options ,
820820 platform,
821821 } ) ;
822822
823823 const bundleParams = await checkPlugins ( ) ;
824- const sourcemap = bundleParams . sourcemap ;
824+ const sourcemapPlugin = bundleParams . sourcemap ;
825825 const isSentry = bundleParams . sentry ;
826826
827827 const sourcemapOutput = path . join ( intermediaDir , `${ bundleName } .map` ) ;
@@ -842,7 +842,7 @@ export const commands = {
842842 entryFile ,
843843 intermediaDir ,
844844 platform ,
845- sourcemap ? sourcemapOutput : '' ,
845+ sourcemap || sourcemapPlugin ? sourcemapOutput : '' ,
846846 ) ;
847847
848848 await pack ( path . resolve ( intermediaDir ) , realOutput ) ;
0 commit comments