Socket
Socket
Sign inDemoInstall

browser-resolve

Package Overview
Dependencies
Maintainers
2
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browser-resolve

resolve which handles browser field support in package.json


Version published
Weekly downloads
3.5M
decreased by-2.22%
Maintainers
2
Weekly downloads
 
Created

What is browser-resolve?

The browser-resolve npm package is designed to resolve module dependencies in a way that is compatible with how browsers resolve modules, as opposed to the Node.js resolution algorithm. This is particularly useful for bundling packages for use in the browser where the Node.js module resolution strategy (e.g., handling of the 'main' field in package.json) does not apply.

What are browser-resolve's main functionalities?

Resolving browser-specific module entry points

This feature allows developers to resolve the path to a module's browser-specific entry point, if specified in the module's package.json, instead of the Node.js entry point. This is useful for bundling modules for the browser.

var resolve = require('browser-resolve');
resolve('module-name', { filename: '/path/to/file.js' }, function (err, res) {
  if (err) console.log(err);
  console.log(res);
});

Other packages similar to browser-resolve

Keywords

FAQs

Package last updated on 06 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc