I just updated from version 0.34.0 to 0.36.0. In version 0.34.0 it works perfectly.
ncc: Version 0.36.0
ncc: Compiling file index.js into CJS
...
esm_dirname = (0,external_url_.fileURLToPath)(import.meta.url);
^^^^
SyntaxError: Cannot use 'import.meta' outside a module
...