Alternative for "browser" key with higher priority
See original GitHub issueI’ve stumbled upon this issue in https://github.com/mwilliamson/mammoth.js/pull/106
browser
key is widely used for defining which file should be used in browser environment. Some tools might use this field optionally, but they also have an alternative which is tool-specific, for instance, in webpack.
Could you add support for something like browserify.browser
with higher priority in addition to browser
?
Issue Analytics
- State:
- Created 7 years ago
- Comments:20 (10 by maintainers)
Top Results From Across the Web
Optimizing resource loading with Priority Hints - web.dev
Priority Hints indicate the relative priority of resources to the browser. They can enable optimal loading and improve Core Web Vitals.
Read more >KeyboardEvent.keyCode - Web APIs - MDN Web Docs
When implementing a shortcut key handler, the keypress event is usually better (at least when Gecko is the runtime in use).
Read more >How to Select the Priority Level for a Program in Windows 11
Select Task Manager's Details tab. Then right-click the EXE process for the software you just started to select Set priority. Choose a Realtime ......
Read more >Priority Hints - What Your Browser Doesn't Know (Yet) - Etsy
Priority Hints are a newly released browser feature, currently available in Chrome and Edge, that give web developers the option of signaling ...
Read more >6 Tools to Permanently Set Process Priority in Windows
For example, if you're running a processor intensive task such as video encoding, and it has a higher priority than your web browser,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t see any harm, other than added complexity, of adding such a key - but since all the bundlers and ecosystem tools expect this definition of the “browser” field, i don’t think it would be beneficial for authors - anyone using the browser field for the purpose you describe would end up getting bug reports from the majority of the ecosystem.
In other words, adding a “browserify” key won’t change the reality that “browser” already has a permanent meaning, and that for your use case, you’d want a custom field name regardless.
Right now D3 doesn’t use
browser
field at all. Not sure why, but in past they have clearly used it for specifying browser build separately from Node.js build: https://github.com/d3/d3/blob/c57952f349dff8bb8035316cedc8878bf7d8b97e/package.json#L18-L19I did a mini-research on common fields about ~1.5-2 years ago and wouldn’t bother to do it again, but back then there were more projects like that.
I think if at this point you are still not convinced to scope browserify’s stuff under browserify key (which by the way already exists) even optionally as other projects do, then I’m disappointed and have really nothing to add.