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

d-l-l

v0.0.7

Published

easy, automatic, optimized dll config handler for webpack

Downloads

20

Readme

⚡🤸 d-l-l

NPM version MIT License fliphub flipfam

easy, automatic, optimized dll config handler for webpack

📦 install

yarn add d-l-l --dev
npm i d-l-l --save-dev

📘 examples

🌐 full api

⚙ advanced config examples

🔗 read more webpack dll plugins

👋 intro

Webpack's Dll and DllReference plugins are a way to split a large JavaScript project into multiple bundles which can be compiled independently. They can be used to optimize build times (both full and incremental) and improve caching for users by putting code which changes infrequently into separate "library" bundles. - Robert Knight

Unfortunately, the DLL plugins come with some problems.

ℹ️️ This package aims to provide solutions for them by allowing you to pass in any existing webpack config, then get it back decorated with dll-reference-plugins and (only when needed) a whole dll-plugin-only config prepended!

❎ problems with dll plugin:

  • can be a pain to configure
  • requires manually adding plugins, and the entry points in your source code alongside the package dependencies
  • requires multiple config files
  • requires multiple build scripts
  • requires manual cache busting when you change code, which makes it difficult to dynamically include code that does not often change
  • does not work without even more configuration on nodejs

✅ solution

🖼️ screenshots

without d-l-l
with d-l-l

❔ how

Webpack allows exporting an array of configs, so when required, a DLL-only config is created using the provided config(s) & prepended to the array of configs.

Cache files are created in a .fliphub folder (can be safely added to gitignore, similar to .happypack or similar). This helps to provide some smart-ish checks:

✚ = (dll config will be prepended)

  1. when no cache exists, ✚
  2. when there are no manifest files, ✚
  3. when cache-busting-files change, the cache is busted and ✚
  4. every X (default 33) builds
  5. after a day since the last build

see the src code

📖 usage

// webpack.config.js
const DLL = require('d-l-l')

const dll = new DLL()
const configs = dll
  .dir(__dirname)
  .config(config)
  .find()
  .pkgDeps()
  .toConfig()

module.exports = configs