mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
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
11 lines
290 B
Bash
Executable File
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
|