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 🙏

© 2025 – Pkg Stats / Ryan Hefner

webpack-here

v1.2.4

Published

Quickly convert `.jsx` with decorators and class properties into browser-safe `.js` file.

Readme

Webpack Here

Quickly convert .jsx with decorators and class properties into browser-safe .js file.

Plugins and presets

Webpack is using babel-loader to build your code with the following presets:

And plugins:

Installation

It is recommended to install webpack-here globally:

npm install -g webpack-here

Usage

wepack-here [source-file [destination-file]] [--publicPath=/public/path/] [--customConfig=.webpack-here.config.js]

Usage with IDE's autoupload feature

If you're uploading files on save, the resulting {your-project}.js file won't be uploaded since it will be ready a fraction of a second after the .jsx file was saved. Since the output file is changing by external program (Webpack in this case), IDE cannot predict when it should refresh the project base directory.

To workaround this issue in PHPStorm I've wrote a small script to use with ScriptMonkey extension.

Minification and sourcemaps

I intentionally turned minification and sourcemaps off to reduce build time. You can override it in your local .webpack-here.config.js file.

Public path for babel-plugin-dynamic-import-webpack

If you want to use dynamic imports, you need to make sure output.publicPath option is set correctly.

By default webpack-here tries to assume a public path using your Git root or IntelliJ IDEA project root. Otherwise it will use / as public path.

You can override public path by passing a --publicPath argument to to webpack-here like so:

webpack-here --publicPath=/my/public/path

User config

If you need to override some config options, you can create a .webpack-here.config.js file in your root directory. You can change the file name by passing --customConfig argument to webpack-here like so:

webpack-here --customConfig=relative/path/to/my-webpack-here-config.js

User config should export an object with the following structure:

module.exports = {
	<SomeOverrideKey>: <someValue>,
	<OtherOverrideKey>: <someOtherValue>,
}

Override key is a string with dot-separated path to override, e.g. "module.rules.0.test". You can end key with [] to merge instead of replace, e.g. "module.rules[]". Merge type (object or array) is determined by original value type (or by your value type if original doesn't exist).

Here're some examples:

module.exports = {
	// Replace babel-loader without touching other params:
	"module.rules.0.loader": "custom-babel-loader",
	
	// Replace babel-loader plugins completely:
	"module.rules.0.query.plugins": ["@babel/plugin-the-only-plugin-i-need"],
	
	// Add babel-loader plugin:
	"module.rules.0.query.plugins[]": [ "@babel/plugin-some-additional-plugin" ],
	
	// Add second loader without touching Babel:
	"module.rules[]": [ { test: /\.(xls|xlsx|csv)$/, loader: "my-custom-spreadsheet-loader" } ],
	
	// Turn on error details without changing other `stats` options:
	"stats.errorDetails": true,
	
	// If you don't need a deep merge, just treat this object like a regular webpack config:
	cache: false,
	devtool: "eval-cheap-module-source-map",
	entry: [
		'path/to/some-entry-file.js',
		'path/to/some-other-entry-file.js'
	],
	optimization: {
		minimizer: [
			new UglifyJsPlugin({
				sourceMap: true,
				uglifyOptions: {
					compress: { inline: false, drop_console: true },
				},
			}),
		],
	},
};