browserify / browserify/module-deps

pass pkg.__dirname to transform functions

Open
#112 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
208
Forks
102
PR merge metrics
No merged PRs in 30d

Description

As we cannot write `__dirname` to package.json, transforms which require directories must be given relative paths.

package.json

``` json
{
"browserify": {
"transform": [
["transform1", {"dirname": "relative/path"} ]
]
}
}
```

However, there is no way to resolve absolute paths. `process.cwd()` varies by where node process is created.

Pass `pkg.__dirname` to transform functions and we can calculate absolute paths from where the package.json file is located.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.