@@ -87,7 +87,6 @@ async function runReactNativeBundleCommand(
8787 }
8888 }
8989 const bundleParams = await checkPlugins ( ) ;
90- const minifyOption = bundleParams . minify ;
9190 const isSentry = bundleParams . sentry ;
9291 const bundleCommand = usingExpo
9392 ? 'export:embed'
@@ -126,8 +125,6 @@ async function runReactNativeBundleCommand(
126125 '--platform' ,
127126 platform ,
128127 '--reset-cache' ,
129- '--minify' ,
130- minifyOption ,
131128 ] ) ;
132129
133130 if ( sourcemapOutput ) {
@@ -420,7 +417,7 @@ async function pack(dir, output) {
420417 }
421418 const childs = fs . readdirSync ( root ) ;
422419 for ( const name of childs ) {
423- if ( name === '.' || name === '..' || name === 'index.bundlejs.map' ) {
420+ if ( name === '.' || name === '..' || name === 'index.bundlejs.map' || name === 'index.bundlejs.txt.map' ) {
424421 continue ;
425422 }
426423 const fullPath = path . join ( root , name ) ;
@@ -814,14 +811,14 @@ export const commands = {
814811 options . platform || ( await question ( '平台(ios/android/harmony):' ) ) ,
815812 ) ;
816813
817- const { bundleName, entryFile, intermediaDir, output, dev } =
814+ const { bundleName, entryFile, intermediaDir, output, dev, sourcemap } =
818815 translateOptions ( {
819816 ...options ,
820817 platform,
821818 } ) ;
822819
823820 const bundleParams = await checkPlugins ( ) ;
824- const sourcemap = bundleParams . sourcemap ;
821+ const sourcemapPlugin = bundleParams . sourcemap ;
825822 const isSentry = bundleParams . sentry ;
826823
827824 const sourcemapOutput = path . join ( intermediaDir , `${ bundleName } .map` ) ;
@@ -842,7 +839,7 @@ export const commands = {
842839 entryFile ,
843840 intermediaDir ,
844841 platform ,
845- sourcemap ? sourcemapOutput : '' ,
842+ sourcemap || sourcemapPlugin ? sourcemapOutput : '' ,
846843 ) ;
847844
848845 await pack ( path . resolve ( intermediaDir ) , realOutput ) ;
0 commit comments