Skip to content

refactor: added additional entries helper #3714

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Aug 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
454 changes: 378 additions & 76 deletions lib/Server.js

Large diffs are not rendered by default.

352 changes: 0 additions & 352 deletions lib/utils/DevServerPlugin.js

This file was deleted.

32 changes: 32 additions & 0 deletions migration-v4.md
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,38 @@ module.exports = {

- The `sockWrite` public method was renamed to `sendMessage`.
- The `profile` option was removed in favor [`ProfilingPlugin`](https://webpack.js.org/plugins/profiling-plugin/).
- The `addDevServerEntrypoints` method was removed in favor of manual configuration.

v4:

```js
const webpack = require("webpack");
const DevServer = require("webpack-dev-server");

const config = {
entry: [
// Runtime code for hot module replacement
"webpack/hot/dev-server.js",
// Dev server client for web socket transport, hot and live reload logic
"webpack-dev-server/client/index.js?hot=true&live-reload=true",
// Your entry
"./src/entry.js",
],
plugin: [
// Plugin for hot module replacement
new webpack.HotModuleReplacementPlugin(),
],
};
const compiler = webpack(config);
// `hot` and `client` options are disabled because we added them manually
const server = new DevServer({ hot: false, client: false }, compiler);

(async () => {
await server.start();

console.log("Running");
})();
```

### Deprecations

Expand Down
Loading