mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Add a naive WPO implementation
Summary: public RFC: The minifier haven't been stripping dead-code, and it also can't kill unused modules, so as a temporary solution this inlines `__DEV__`, kill dead branches and kill dead modules. For now I'm just white-listing the dev variable, but we could definitely do better than that, but as a temporary fix this should be helpful. I also intend to kill some dead variables, so we can kill unused requires, although inline-requires can also fix it. Reviewed By: vjeux Differential Revision: D2605454 fb-gh-sync-id: 50acb9dcbded07a43080b93ac826a5ceda695936
This commit is contained in:
committed by
facebook-github-bot-5
parent
bd1885b5d4
commit
0b46a0c13b
@@ -44,7 +44,7 @@ function buildBundle(args, config) {
|
||||
client.close();
|
||||
return outputBundle;
|
||||
})
|
||||
.then(outputBundle => processBundle(outputBundle, !args.dev))
|
||||
.then(outputBundle => processBundle(outputBundle, args.dev))
|
||||
.then(outputBundle => saveBundleAndMap(
|
||||
outputBundle,
|
||||
args.platform,
|
||||
|
||||
Reference in New Issue
Block a user