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 🙏

© 2024 – Pkg Stats / Ryan Hefner

ljas-webpack

v0.1.0

Published

webpack configuration parts for webpack config compositions

Downloads

9

Readme

ljas-webpack

npm License

ljas-webpack is a library of webpack configuration parts. It was originally built for Lean JS App Starter (LJAS), but you may find it useful for your own webpack configurations.

Installation

npm install --save-dev ljas-webpack

ljas-webpack vs. Conventional webpack Configuration

When you compare a webpack config file written with ljas-webpack to an equivalent conventional one (like one you'd see in the webpack docs' "Getting Started" guide), you'll find that ljas-webpack drastically reduces clutter and makes the config code easier to understand at a high-level.

You can see this comparison yourself with a basic example that we have available for you to check out.

Usage

Although it's not required, we designed this library with the intention that it would be used with webpack-merge.

If you're unfamiliar with webpack-merge, its main purpose is to improve the composition and maintenance of webpack configurations. We highly recommended reading the "Composing Configuration" chapter in the SurviveJS webpack book, a free book by one of the founders of the webpack core team, Juho Vepsäläinen. This resource was actually the catalyst for this library.

You can also get an idea of how webpack-merge works by reading over its usage in the webpack docs' "Production" guide. It doesn't go over the concept of a configuration parts like SurviveJS does, but it does use webpack-merge to split the webpack config across separate files to improve maintainability.

The root of this repository will have various .js files that export functions available for you to import into your own webpack configs. Each function exported from these files will have a JSDoc comment that explains what it does and what packages it relies on.

Documentation & Examples

Besides reading the JSDoc comments in the source code, you can also view the HTML docs generated from them in the docs/ directory. You can also view the docs for the latest version of the library at: https://mattlean.github.io/lean-js-app-starter

If you would like to see some examples of webpack configs, check out the examples/ directory.

For more complicated examples, check out Lean JS App Starter's examples and starter projects.

License

ljas-webpack is open source software licensed as MIT.