Open tmtron opened 2 years ago
I can't reproduce the issue.
mkdir example
cd example
npm init -y
npm install socket.io
echo "const s = require('http').createServer();const io = require('socket.io')(s);console.log(typeof io)" > index.js
ncc build index.js
rm -rf node_modules
node dist/index.js
Can you share how to reproduce?
@styfle you must add the --asset-builds
argument to see the issue:
ncc build --asset-builds index.js
I see, thanks!
The bug is likely somewhere in this if
block: https://github.com/vercel/ncc/blob/f4b546e8078f31f1eed0cc69fd31603bb37a3386/src/index.js#L588
If you want to fix it, feel free to submit a PR, thanks! 👍
any update?
any update?
e.g. the newer socket.io packages contain esm and cjs .js files in their dist folder (4.4.0)
socket.io.esm.min.js
socket.io.min.js
When we use
--asset-builds
(we need this, because of other dependencies, that must be compiled), we get an error:Is there a way to only exclude the
*.esm*.js
filesncc version:
0.33.1
Backreference:
dm#915