bundles

  • property
config.bundles {Object<moduleName,Array<moduleName>>}  

Bundles configuration allows a single bundle file to be loaded in place of separate module files.

Object<moduleName,Array<moduleName>>

An object where keys are bundle moduleNames and values are Arrays of moduleNames that the bundle contains.

Use

Specify bundles if you are using a prebuilt bundle. For example, if "jqueryui.autocomplete" and "jqueryui.datepicker" are in "jqueryui.custom", you can specify that like:

steal.config({
    bundles: {
        "jqueryui.custom": [
            "jqueryui.autocomplete",
            "jqueryui.datepicker"
        ]
    }
});

If bundle is passed to steal-tools, it will write out where to load bundles in the production bundles.

Production Default Values

In production a bundles is written out to contain the main module. For example:

steal.config({
  main: "myapp",
  env: "production"
  bundles: {
    "bundles/myapp": "myapp"
  }
});

This way, when the "myapp" module is imported, Steal will load ["bundles/myapp"]. Use bundlesPath to configure where bundles are found.