// 特殊的模塊也需要排除
if (path.indexOf("__prelude__") >= 0 ||
path.indexOf("/node_modules/react-native/Libraries/polyfills") >= 0 ||
path.indexOf("source-map") >= 0 ||
path.indexOf("/node_modules/metro/src/lib/polyfills/") >= 0) {
return false;
}
if (module['path'].indexOf(pathSep + 'node_modules' + pathSep) > 0) {
if ('js' + pathSep + 'script' + pathSep + 'virtual' == module['output'][0]['type']) {
return true;
} 這里的為什么要排除,打基礎(chǔ)包的時(shí)候,基礎(chǔ)包里面也沒有這些啊
RN Metro拆包實(shí)踐一、Metro 是什么 Metro 是一個(gè)針對(duì) React Native的JavaScript模塊打包器,他接收一個(gè)entry file (入口文件) 和一些配置作為參數(shù),返...