Simple js bundler written in 50100 lines of code.
Also, before adding dynamic require support, it's just under 50 lines. (:
- bundle commonjs module
- dynamic import/require.ensure
// 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'
}];
./bin/packer