Open jeffrson opened 2 years ago
@guybedford Any thoughts would could cause this? Looks like the native addons from node_modules/@serialport/bindings-cpp/build/Release
are not relocated to dist
.
Any news on this? Copying assets I find is a weak spot for ncc. How about adding the ability to specify hints/directives to ncc to help it with this?
For serialport (https://www.npmjs.com/package/serialport) 10, ncc fails with ESM as well (https://github.com/vercel/ncc/issues/899).
Furthermore it fails to copy binary assets (*.node).
index.cjs
ncc build .\index.cjs -s -C --target es2020
C:\temp\sp_test\dist\index.cjs:3496 throw new Error('No native build was found for ' + target + '\n loaded from: ' + dir + '\n') ^ Error: No native build was found for platform=win32 arch=x64 runtime=node abi=93 uv=1 libc=glibc node=16.14.2 webpack=true loaded from: C:\temp\sp_test
...