Skip to content

Commit c65d904

Browse files
rafecafacebook-github-bot
authored andcommitted
Improve HMR performance by allowing to specify bundlingOptions to getShallowDependencies() method
Reviewed By: jeanlauliac Differential Revision: D5745205 fbshipit-source-id: a69ac40bb676a809e3786681179e2b4bac392ce6
1 parent 77c11e8 commit c65d904

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

local-cli/server/util/attachHMRServer.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ type DependencyOptions = {|
3939
+platform: ?string,
4040
+recursive: boolean,
4141
+rootEntryFile: string,
42+
+bundlingOptions?: Object,
4243
|};
4344

4445
/**
@@ -144,6 +145,7 @@ function attachHMRServer<TModule: Moduleish>(
144145
minify: false,
145146
platform: platform,
146147
recursive: true,
148+
bundlingOptions: response.options,
147149
});
148150

149151
return {

local-cli/server/util/getInverseDependencies.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export type ResolutionResponse<TModule> = {
2727
getResolvedDependencyPairs(
2828
module: TModule,
2929
): $ReadOnlyArray<[string, TModule]>,
30+
options: Object,
3031
};
3132

3233
function resolveModuleRequires<TModule>(

0 commit comments

Comments
 (0)