the-super-tiny-web-module-resolver
the-super-tiny-web-module-resolver copied to clipboard
simple js bundler written in 100 lines of code.
The Super Tiny Web Module Resolver
Simple js bundler written in 50100 lines of code.
Also, before adding dynamic require support, it's just under 50 lines. (:
feature
- [x] bundle commonjs module
- [x] dynamic import/require.ensure
config
// packer.config.js
module.exports = {
base: "./test/case1", // default current __dirname
entry: "index.js", // default index.js
output: "bundle.js" // default index.bundle.js
};
or
// packer.config.js
module.exports = [{
base: './test/case1'
}, {
base: './test/case2'
}, {
base: './test/case3'
}];
usage
./bin/packer