▸ getDirname(fileUrl): string
Get absolute directory (without any protocol) from a file:// URL of a module.
Mostly useful in ESM Webpack configs, where __dirname is not available, but import.meta.url is.
example Usage in Webpack config (ESM):
| Name | Type | Description |
|---|---|---|
fileUrl |
string |
String with absolute file:// URL of a module. |
string
Absolute dirname without file:// of a module pointed by fileUrl.