Files
socket.io/postcompile.sh
Damien Arrachequesne f56fdd0f09 chore: remove duplicate package.json file
The additional package.json file, which was copied to
build/cjs/package.json, did hide the parent one, leading to several
issues and providing no real feature. The other one, copied to
build/esm/package.json, is needed though, to enforce the module type.

Related:

- https://github.com/socketio/socket.io/issues/4194
- https://github.com/socketio/socket.io-client/issues/1513
2022-01-04 09:57:43 +01:00

11 lines
290 B
Bash
Executable File

#!/bin/bash
cp ./support/package.esm.json ./build/esm/package.json
cp -r ./build/esm/ ./build/esm-debug/
sed -i '/debug(/d' ./build/esm/*.js
# for backward compatibility with `const socket = require("socket.io-client")(...)`
echo -e '\nmodule.exports = lookup;' >> ./build/cjs/index.js