ionic-team / ionic-team/rollup-plugin-node-polyfills
Can't get `__dirname` to work
- Dominant language
- JavaScript
- Stars
- 142
- Forks
- 65
- PR merge metrics
- No merged PRs in 30d
Description
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
```
Null byte (`\0`) is really in [these lines](https://github.com/ionic-team/rollup-plugin-node-polyfills/blob/v0.2.1/src/index.ts#L54-L55). 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
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.