Skip to content

Commit 548fc48

Browse files
authored
Breaking: Remove hot from getTransformOptions (#2159)
1 parent 4329ee7 commit 548fc48

5 files changed

Lines changed: 3 additions & 9 deletions

File tree

‎docs/Configuration.md‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ When using React Native, `getTransformOptions` enables `inlineRequires` by defau
598598
```flow
599599
function getTransformOptions(
600600
entryPoints: $ReadOnlyArray<string>,
601-
options: {dev: boolean, hot: true, platform: ?string},
601+
options: {dev: boolean, platform: ?string},
602602
getDependenciesOf: (path: string) => Promise<Array<string>>,
603603
): Promise<ExtraTransformOptions> {
604604
// ...
@@ -608,7 +608,6 @@ function getTransformOptions(
608608
- **`entryPoints`**: Absolute paths to the bundle's [entry points](./Concepts.md#entry-point) (typically just one).
609609
- **`options`**:
610610
- **`dev`**: Whether the bundle is built in development mode.
611-
- **`hot`**: <div class="label deprecated">Deprecated</div> Always true.
612611
- **`platform`**: The target platform (e.g. `ios`, `android`).
613612
- **`getDependenciesOf`**: Given a module's absolute path, resolves to the absolute paths of its transitive dependencies.
614613

‎packages/metro-config/API.md‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ export type GetTransformOptions = (
5858

5959
export type GetTransformOptionsOpts = {
6060
dev: boolean;
61-
hot: true;
6261
platform: null | undefined | string;
6362
};
6463

‎packages/metro-config/src/types.js‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ export type ExtraTransformOptions = Readonly<{
4545

4646
export type GetTransformOptionsOpts = {
4747
dev: boolean,
48-
/**
49-
* @deprecated Always true
50-
*/
51-
hot: true,
5248
platform: ?string,
5349
};
5450

‎packages/metro/src/DeltaBundler/Serializers/getRamBundleInfo.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ async function _getRamOptions(
156156

157157
const {preloadedModules, ramGroups} = await getTransformOptions(
158158
[entryFile],
159-
{dev: options.dev, hot: true, platform: options.platform},
159+
{dev: options.dev, platform: options.platform},
160160
async (x: string) => Array.from(getDependencies(x)),
161161
);
162162

‎packages/metro/src/lib/transformHelpers.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ async function calcTransformerOptions(
105105

106106
const {transform} = await config.transformer.getTransformOptions(
107107
entryFiles,
108-
{dev: options.dev, hot: true, platform: options.platform},
108+
{dev: options.dev, platform: options.platform},
109109
getDependencies,
110110
);
111111

0 commit comments

Comments
 (0)