Skip to content

Latest commit

 

History

History
39 lines (30 loc) · 645 Bytes

File metadata and controls

39 lines (30 loc) · 645 Bytes

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

  • bundle commonjs module
  • 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