Skip to content

resetmerlin/enchant.js

Repository files navigation

EnchantPack - Merlin's bundler

Image

EnchantHarvest - Merlin's file collector

Image

Build webpack from scratch

  • Add a --minify flag that runs a minifier like terser on each individual file in the bundle.

  • Add a --Gzip flag that send response of compressed resources or use brotli, learn about Content-Encoding

  • Add a --treeShaking flag that tree shakes the code

  • Add a --codeSplitting flag that makes lazy load the code

  • Add a cache that will store transformed files and only re-compile files that have changed.

  • Medium: Learn about source maps and generate the corresponding .map file for your bundle.

  • Medium: Add a --dev option that starts a HTTP server that serves the bundled code through an HTTP endpoint.

  • Medium: After implementing the HTTP server, make use of jest-haste-map’s watch function to listen for changes and re-bundle automatically.

  • Advanced: Learn about Import Maps and change the bundler from being require based to work with native ESM!

  • Advanced: Hot reloading: Adjust the runtime so it can update modules by first de-registering and then re-running the module and all of its dependencies.

  • Advanced: Rewrite the above bundler in another programming language like Rust.

About

Personal Javascript Framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published