From 32e1776fc2eb7c3196f7a6eff88d55887511de65 Mon Sep 17 00:00:00 2001 From: yinhf Date: Fri, 22 Mar 2019 14:29:24 +0800 Subject: [PATCH] =?UTF-8?q?Update=20React=20Native=20config=20=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E8=BF=87=E7=A8=8B.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...40\350\275\275\350\277\207\347\250\213.md" | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git "a/React Native config \345\212\240\350\275\275\350\277\207\347\250\213.md" "b/React Native config \345\212\240\350\275\275\350\277\207\347\250\213.md" index 8b13789..5d22b0b 100644 --- "a/React Native config \345\212\240\350\275\275\350\277\207\347\250\213.md" +++ "b/React Native config \345\212\240\350\275\275\350\277\207\347\250\213.md" @@ -1 +1,23 @@ +## react-native 0.59 + +``` +https://github.com/react-native-community/react-native-cli/blob/v2.0.0/packages/cli/src/commands/server/runServer.js#L48 +https://github.com/react-native-community/react-native-cli/blob/v2.0.0/packages/cli/src/tools/loadMetroConfig.js#L95 +https://github.com/facebook/metro/blob/v0.53.1/packages/metro-config/src/loadConfig.js#L239 +https://github.com/facebook/metro/blob/v0.53.1/packages/metro-config/src/loadConfig.js#L62 + +默认配置文件名 +[ + 'metro.config.js', + 'metro.config.json', + 'package.json', + 'rn-cli.config.js', +] + +默认 react-native config +https://github.com/react-native-community/react-native-cli/blob/v2.0.0/packages/cli/src/tools/loadMetroConfig.js#L34 + +默认 metro config +https://github.com/facebook/metro/blob/v0.53.1/packages/metro-config/src/defaults/index.js +```