Skip to content

Commit b74c265

Browse files
committed
docs: make the migration guide's entry snippet valid standalone JS
eslint parses the README's fenced code blocks, and the bare `entry: [...]` object fragment failed with "Unexpected token :" — the before/after entries are now wrapped in module.exports.
1 parent 4fafede commit b74c265

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,10 +503,14 @@ In the webpack configuration, swap the client entry (`HotModuleReplacementPlugin
503503

504504
```js
505505
// Before
506-
entry: ["webpack-hot-middleware/client?timeout=20000", "./src/app.js"],
506+
module.exports = {
507+
entry: ["webpack-hot-middleware/client?timeout=20000", "./src/app.js"],
508+
};
507509

508510
// After
509-
entry: ["webpack-dev-middleware/client?timeout=20000", "./src/app.js"],
511+
module.exports = {
512+
entry: ["webpack-dev-middleware/client?timeout=20000", "./src/app.js"],
513+
};
510514
```
511515

512516
Option mapping:

0 commit comments

Comments
 (0)