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

parcelify-loader

v2.0.0

Published

parcelify-like loader module for webpack 2

Downloads

371

Readme

parcelify-loader

A simple webpack loader that mimics the function of parcelify.

tl;dr

$ npm install --save-dev parcelify-loader

Documentation: using loaders

Why is this necessary?

Some browserify-based projects are relying on parcelify to bundle necessary module stylesheets by reading values from an additional style property in the component's package.json file. Webpack relies on CommonJS import/require syntax, so it does not read bundling information from a package file.

How does this work?

The loader reads from package.json, parses the style attribute and adds a virtual require() for the stylesheet to the in-mem version of the loaded javascript file.

Configuration

You will need to configure parcelify-loader for the javascript source files in your webpack.config.js.

Note: you will also need an appropriate stylesheet loader, read more about it here.

parcelify-loader

Apply parcelify-loader to the desired filetypes (enforcing pre to run before all other transformations):

module: {
  rules: [
    {
      test: /\.js$/,
      enforce: "pre",
      use: [ "parcelify-loader" ],
      include: [
        path.resolve("./src"),
        path.resolve("./node_modules/your-browserify-components") // e.g.
      ]
    }
  ]
}       

Make sure you include your compoment's source directory in include; otherwise, native styles for components will not be included.

(Optional) Configure parcelify-loader with project specific settings:

module: {
  rules: [
    {
      ...
      use: [
        loader: "parcelify-loader",
        options: {
          json: "component.json"
        }
      ]
    }
  ]
}

parcelify-loader API

The following settings can be configured for parcelify-loader:

  • json - the filename of your component's json file. Default:
options: {
  json: "package.json"
}
  • encoding - the encoding of your component's json file. See list of encodings for supported encodings. Default:
options: {
  encoding: "utf8"
}
  • require - the statement to wrap the required style file in. Note that this setting must have a $1 parameter to work. Default:
options: {
  require: "require($1)"
}
  • lineBreakSeq - the character sequence to render after require. Typically, you will not need anything but the linebreak. Default:
options: {
  lineBreakSeq: "\n"
}

Support for webpack 1

Version 1.0.0 of parcelify-loader supports webpack 1.14.0.