Socket.Io/4/Ws Engine Format Update

1.0.8Last update Sep 5, 2024
by@35c4n0r

This codemod when bundling the server with webpack will update the format of wsEngine to get the rid following error:

Critical dependency: the request of a dependency is an expression.

Example

Before:

const io = require("socket.io")(httpServer, {
wsEngine: "eiows"
});

After:

const io = require("socket.io")(httpServer, {
wsEngine: require("eiows").Server
});

Build custom codemods

Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community

background illustrationGet Started Now