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.22k stars 287 forks source link

Require with absolute path #206

Open lishine opened 5 years ago

lishine commented 5 years ago

Is there a solution to require using absolute paths: require('utils/error') ? Here I started a discussion: https://github.com/zeit/now-builders/issues/151

pie6k commented 5 years ago

Any update on that?

Imports like ~/utils (with ~) at start is popular convention to go to project root

see: https://parceljs.org/module_resolution.html

lishine commented 5 years ago

I just use babel. So get rid of the require as well