Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit 180a345

Browse files
committed
fix: don't process runtime.js files
We needed a special processing for `runtime.js` files as we excluded them when transferring the files on device. As the CLI is filtering and emit only hot-update files we don't need this logic anymore.
1 parent d5838d6 commit 180a345

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

Diff for: plugins/WatchStateLoggerPlugin.ts

+1-20
Original file line numberDiff line numberDiff line change
@@ -29,32 +29,13 @@ export class WatchStateLoggerPlugin {
2929
console.log(messages.compilationComplete);
3030
}
3131

32-
const runtimeOnlyFiles = getWebpackRuntimeOnlyFiles(compilation);
3332
let emittedFiles = Object
3433
.keys(compilation.assets)
3534
.filter(assetKey => compilation.assets[assetKey].emitted);
3635

3736
process.send && process.send(messages.compilationComplete, error => null);
3837
// Send emitted files so they can be LiveSynced if need be
39-
process.send && process.send({ emittedFiles, webpackRuntimeFiles: runtimeOnlyFiles }, error => null);
38+
process.send && process.send({ emittedFiles }, error => null);
4039
});
4140
}
4241
}
43-
44-
function getWebpackRuntimeOnlyFiles(compilation) {
45-
let runtimeOnlyFiles = [];
46-
try {
47-
runtimeOnlyFiles = [].concat(...Array.from<any>(compilation.entrypoints.values())
48-
.map(entrypoint => entrypoint.runtimeChunk)
49-
// filter embedded runtime chunks (e.g. part of bundle.js or inspector-modules.js)
50-
.filter(runtimeChunk => !!runtimeChunk && runtimeChunk.preventIntegration)
51-
.map(runtimeChunk => runtimeChunk.files))
52-
// get only the unique files in case of "single" runtime (e.g. runtime.js)
53-
.filter((value, index, self) => self.indexOf(value) === index);
54-
} catch (e) {
55-
// breaking change in the Webpack API
56-
console.log("Warning: Unable to find Webpack runtime files.");
57-
}
58-
59-
return runtimeOnlyFiles;
60-
}

0 commit comments

Comments
 (0)