The first script I tried ncc on failed like this:
(node:71332) UnhandledPromiseRejectionWarning: Error: Hash: c93a3aedc91c7aab0770
Version: webpack 4.26.0
Time: 127ms
Built at: 2018-11-27 16:04:22
Asset Size Chunks Chunk Names
out.js 4.7 KiB 0 main
Entrypoint main = out.js
[0] ./2-stats2boundaries.js 1.11 KiB {0} [built] [failed] [1 error]
ERROR in ./2-stats2boundaries.js
Module build failed (from (webpack)/ncc/asset-relocator.js):
SyntaxError: Unexpected character '#' (1:0)
at Parser.module.exports.pp$4.raise (/Users/stevebennett/npm/lib/node_modules/@zeit/ncc/dist/ncc/asset-relocator.js:16125:13)
...
The first line of that script is:
#!/usr/bin/env node --max-old-space-size=4096
I'm not entirely sure if we want to fix this one. There's a pretty good workaround:
#!/usr/bin/env node --max-old-space-size=4096
require('./dist')
What do you think?
Have the same problem. In this specific case the shebang is on a nested dependency, so I don't think the proposed solution applies
The solution in https://github.com/webpack/webpack/issues/4603 seems straightforward to apply here.
I changed my mind. We definitely want to fix this one. Node.js supports it, so should ncc
Most helpful comment
I changed my mind. We definitely want to fix this one. Node.js supports it, so should
ncc