Skip to content
/ weepack Public

📦 A wee module bundler demonstrating how Webpack works

License

Notifications You must be signed in to change notification settings

msrose/weepack

Repository files navigation

weepack

Weepack is a wee module bundler that's intended to demonstrate how Webpack works. It should be used purely as an informational resource and is not intended to be used as an actual module bundler. Definitely don't use it in a production environment.

Weepack is still in progress! I'm looking to improve the explanatory comments, and make small changes to the code so that it better reflects an actual module bundler.

  • Heavily commented with explanations for every line of code
  • All comments stripped out so you can see exactly how short a functional module bundler can be
  • Intentionally generated in a readable format

The format of weepack is largely based off that of The Super Tiny Compiler. In fact, I suggest you go through that repository before reading through weepack, since knowledge of compilers will help you understand how module bundlers work.

Usage

node index.js <entry_file> [<output_file>]

For example:

node index.js ./modules/entry.js bundle.js

About

📦 A wee module bundler demonstrating how Webpack works

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published