vercel / ncc

Compile a Node.js project into a single file. Supports TypeScript, binary addons, dynamic requires.
https://npmjs.com/@vercel/ncc
MIT License
9.27k stars 291 forks source link

jsonc-parser #960

Open daiyam opened 2 years ago

daiyam commented 2 years ago

Hello,

I'm using ncc to bundle a vscode extension which is using the jsonc-parser library. With v3.0.0, I don't have any issue. With v3.1.0, ncc doesn't produce any errors but when running the extension, I get Cannot find module './format'

Do you have any advice?

aeschli commented 2 years ago

Looks like the helper function that the TypeScript compile added to edit.js https://unpkg.com/jsonc-parser@3.1.0/lib/umd/impl/edit.js (var __assign = (this && this.__assign) || function () {...). confuses ncc and it would no longer replace require('./format').