ionic-team / ionic-team/rollup-plugin-node-polyfills

Can't get `__dirname` to work

Aperta
#1 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
142
Fork
65
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.