interlockjs / interlock

JS bundler - inspired by Git, built on Babel.
MIT License
72 stars 7 forks source link

Simplify entry-point config #67

Closed divmain closed 8 years ago

divmain commented 8 years ago

Instead of:

{
  entry: {
    "./app.js": "app.bundle.js"
  },
  split: {
    "./lib.js": "lib.bundle.js
  }
}

do instead:

{
  bundles: {
    "./app.js": "app.bundle.js",
    "./lib.js": {  dest: "lib.bundle.js", entry: false }
  }
}
divmain commented 8 years ago

Unresolved question: Is bundles the right name? Thinking ahead to how the semantics of the config might change while in HTTP/2 mode (e.g. only create a bundle for what is now known as a split bundle), bundles might be a confusing choice.

It might also be worth allowing an array of input files, where the destination file is determined by examining the input file basename.

Alternatives: