Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- with `{ "type": "commonjs" }` in the package.json file ```js const io = require("socket.io-client"); const socket = io("/"); ``` - with `{ "type": "module" }` ```js import io from "socket.io-client"; const socket = io("/"); // or import { Manager } from "socket.io-client"; const manager = new Manager(); const socket = manager.socket("/"); ``` Related: https://nodejs.org/api/packages.html#packages_dual_commonjs_es_module_packages
- Loading branch information