Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

development模式下仍然会去加载bundle文件 #11

Open
chj-damon opened this issue Sep 15, 2023 · 2 comments
Open

development模式下仍然会去加载bundle文件 #11

chj-damon opened this issue Sep 15, 2023 · 2 comments

Comments

@chj-damon
Copy link

按照metro.config.js的配置:

module.exports =
  process.env.NODE_ENV === 'production'
    ? mcs.mergeTo(busineConfig)
    : busineConfig

当development模式的时候,metro-code-split的配置不应该生效的,但是实际上在运行Example的时候发现,即便是在development的情况下,还是会去走加载bundle的路子。

请问这算是bug吗?

@jiangleo
Copy link

即便是在development的情况下,还是会去走加载bundle的路子。指的是什么?
使用 busineConfig 时,完全和 metro 一致。因为 metro-code-split 的配置都没有生效,而 mcs 是通过配置形式修改编译代码的。

@chj-damon
Copy link
Author

Example里面,我直接run-ios起来的项目,肯定是development的环境吧,但是从效果上看,它还是去加载了chunks。这个从那个gif上就看得出来。如果不走mcs的话,它应该跟一个普通的RN项目没区别才对

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants