interlockjs/interlock

Simplify entry-point config

divmain opened this issue · 1 comments

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 }
  }
}

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:

  • bundles
  • include
  • entry