browserify / browserify/browser-resolve

"resolve.mainFields"-like support

Open
#91 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
100
Forks
68
PR merge metrics
No merged PRs in 30d

Description

Was deep in the bowels of a large `webpack.config.js` file and came across a challenge that this package seems perfect for solving – with one kinda catch.

That is: _nearly all of the time_ I want to resolve against `"module"`, which I can believe is possible this way after reading the docs:

``` js
resolve.sync('@scope/my-module', { browser: 'module' });
```

**However,** in the absence of `"module"` I would like to fall-back to `"browser"`. This is handled in webpack land [as `resolve.mainFields`](https://webpack.js.org/configuration/resolve/#resolve-mainfields).

Is there interest in this feature? Does it already exist and I overlooked it in the code?

> p.s. long-time no speak. Hope you are well.

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.