ionic-team / rollup-plugin-node-polyfills

MIT License
139 stars 59 forks source link

Can't get `__dirname` to work #1

Open kuraga opened 5 years ago

kuraga commented 5 years ago

When I'm trying to use __dirname I get:

(node:2824) UnhandledPromiseRejectionWarning: Error: Could not load node-polyfills:dirname (imported by /home/sasha/rotorjs/node_modules/tman/lib/tman.js): Path must be a string without null bytes
    at /home/sasha/rotorjs/node_modules/rollup/dist/rollup.js:21718:19
    at <anonymous>

Null byte (\0) is really in these lines. It was introduced in https://github.com/calvinmetcalf/rollup-plugin-node-globals/pull/3 .

See also: https://github.com/calvinmetcalf/rollup-plugin-node-globals/issues/23 .

P.S. Thanks for the fork! :)

/cc @manucorporat