Skip to content

Commit ba94bd4

Browse files
only exit if polling is enabled
1 parent 1f8efae commit ba94bd4

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,6 @@ module.exports = {
224224
Chunk Flushing is the mechanism used to _flush_ dynamic imported chunks out of a render and into the HTML of a document.
225225
If you want to SSR the `<script>` tags of federated imports, reducing Round Trip Time (RTT). You can enable the following experiment
226226

227-
228227
1. Enable the flushChunk experiment via the plugin
229228

230229
```js

flushChunksOrig.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -217,21 +217,21 @@ export class ExtendedHead extends Head {
217217
});
218218
}
219219
}
220-
var interval
220+
var interval;
221221
const hashmap = {};
222222
const revalidate = (options) => {
223223
if (global.REMOTE_CONFIG) {
224224
return new Promise((res) => {
225225
const { poll, timeout } = Object.assign(
226-
{
227-
poll: process.env.NODE_ENV === "development",
228-
timeout: 3000,
229-
},
230-
options
226+
{
227+
poll: process.env.NODE_ENV === "development",
228+
timeout: 3000,
229+
},
230+
options
231231
);
232232

233-
if(poll && interval) {
234-
clearInterval(interval)
233+
if (poll && interval) {
234+
clearInterval(interval);
235235
}
236236

237237
if (poll) {
@@ -252,7 +252,7 @@ const revalidate = (options) => {
252252
hashmap[name] = hash;
253253
console.log(name, "hash is different - must hot reload server");
254254
res();
255-
if(poll){
255+
if (poll) {
256256
process.exit();
257257
}
258258
}

0 commit comments

Comments
 (0)