npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@hqjs/babel-plugin-resolve-modules

v0.0.2

Published

Transform name imports for web browser

Readme

http://hqjs.org

Resolve module names

Installation

npm install hqjs@babel-plugin-resolve-modules

Usage

{
  "plugins": [[ "hqjs@babel-plugin-resolve-modules", {
      "resolve": {
        "foo": "/packages/foo",
        "bar/*": "/packages/bar/",
        "baz/b": "/packages/baz/b",
        "baz/b/*": "/packages/baz/b/",
        "qux_": "/packages/qux"
      }
    }]]
}

Transformation

Plugin will resolve provided modules according to schema. In the example above foo and baz/b are exact transformations so only exact occurance of this names would be transformed, while bar/* and baz/b/* are wildcards, meaning all pathes started with bar/ and baz/b/ would be transformed. Special character _ mean both exact and wildcard matches.

Plugin is stupid and simple so be careful with backslashes.

So script

require('foo');
require('foo/a');
require('bar');
require('bar/a');
require('baz/b');
require('baz/b/c');
require('qux');
require('qux/a');

import 'foo';
import 'foo/a';
import 'bar';
import 'bar/a';
import 'baz/b';
import 'baz/b/c';
import 'qux';
import 'qux/a';

export * from 'foo';
export * from 'foo/a';
export * from 'bar';
export * from 'bar/a';
export * from 'baz/b';
export * from 'baz/b/c';
export * from 'qux';
export * from 'qux/a';

export {foo} from 'foo';
export {fooA} from 'foo/a';
export {bar} from 'bar';
export {barA} from 'bar/a';
export {bazB} from 'baz/b';
export {bazC} from 'baz/b/c';
export {qux} from 'qux';
export {quxA} from 'qux/a';

will turn into

require("/packages/foo");
require('foo/a');
require('bar');
require("/packages/bar/a");
require("/packages/baz/b");
require("/packages/baz/b/c");
require('/packages/qux');
require('/packages/qux/a');

import "/packages/foo";
import 'foo/a';
import 'bar';
import "/packages/bar/a";
import "/packages/baz/b";
import "/packages/baz/b/c";
import '/packages/qux';
import '/packages/qux/a';

export * from "/packages/foo";
export * from 'foo/a';
export * from 'bar';
export * from "/packages/bar/a";
export * from "/packages/baz/b";
export * from "/packages/baz/b/c";
export * from '/packages/qux';
export * from '/packages/qux/a';

export { foo } from "/packages/foo";
export { fooA } from 'foo/a';
export { bar } from 'bar';
export { barA } from "/packages/bar/a";
export { bazB } from "/packages/baz/b";
export { bazC } from "/packages/baz/b/c";
export {qux} from '/packages/qux';
export {quxA} from '/packages/qux/a';