finds.dev← search

// the find

TheLarkInn/webpack-developer-kit

★ 228 · JavaScript · updated Jun 2018

webpack dev kit for writing custom plugins and loaders on the fly. Education/Exploration tool as well.

A minimal boilerplate for learning how to write webpack loaders and plugins, created by a webpack core contributor. It wires up an inline plugin and a local custom loader with an aliased resolver so you can experiment without the npm link dance. Strictly a learning sandbox, not a production scaffold.

The resolveLoader alias trick for developing loaders locally is genuinely useful and not obvious from the webpack docs alone. JSDoc annotations on compiler/compilation objects give you real type hints in VS Code without needing a TypeScript setup. The inline plugin pattern is a clean way to iterate on hook logic without the boilerplate of a separate class. Comes from TheLarkInn who was on the webpack core team, so the patterns here are idiomatic.

Last touched in 2018 — webpack has gone through versions 4 and 5 since then, and the hooks API changed substantially (tapable v2). The README still references the old `plugin()` method style alongside `hooks.compilation.tap`, which will confuse anyone trying to use this with webpack 5. No explanation of how to test loaders or plugins, which is where most people actually get stuck. The example source files (car.js, engine.js) are throwaway noise that add no educational value.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →