Socket.Io/4/Ws Engine Format Update
Made for
Socket.io
Last update
Sep 5, 2024
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