The Unix socket to listen to (instead of a host).
Setting it to true
will listen to a socket at /your-os-temp-dir/webpack-dev-server.sock
:
webpack.config.js
module.exports = {
// ...
devServer: {
ipc: true,
},
};
Usage via CLI:
npx webpack serve --ipc
You can also listen to a different socket with:
webpack.config.js
const path = require("path");
module.exports = {
// ...
devServer: {
ipc: path.join(__dirname, "my-socket.sock"),
},
};
Usage via CLI:
npx webpack serve --ipc ./my-socket.sock
- The script should listen to the socket provided.
- A proxy server should be created.
- Go to
http://localhost:8080/
, you should see the text on the page itself change to readSuccess!
.