forked from OpenNTF/JavascriptAggregator
-
Notifications
You must be signed in to change notification settings - Fork 0
The loader extension config
chuckdumont edited this page Apr 18, 2013
·
4 revisions
The loader extension config is specified on the client using the combo property of the require AMD loader config as illustrated in the following example.
require = { paths: { // define module paths }, packages: { // define module packages }, combo: { contextPath: "testaggr", expandRequire: true, extraArgs: { foo: "bar" } } };
The AMD loader config, along with the loader extension config (the combo property), must be specified before the Aggregator provided loader extension JavaScript and the AMD loader are loaded. A number of config properties are honored only when the Aggregator is running in development mode. These are identified in the table below. See Options for information on how to run the Aggregator in development mode. The loader extension config may specify the following properties:
Property | Description |
---|---|
contextPath | The URL path of the Aggregator service. This is typically the value of the alias attribute in the <servelt> element defining the Aggregator servlet) in plugin.xml, but it may also be a page relative URL. This property is required. |
expandRequire | If boolean true or "true" or "1", then the Aggregator will perform require list expansion. If the value of this property is the string "log", then the Aggregator will perform require list expansion with logging to the browser console (using console.log()) of detailed information about the expansion. This information is useful in analyzing why a particular module is included, or not included, in an expanded require list. This property maps directly to the expandRequire URL query arg for the Aggregator servlet. If development mode or debug mode is not enabled, then specifying "log" has the same effect as specifying "true". |
optimize |
One of "simple", "whitespace" or "none". Specifies the level of optimization performed on the requested modules. The default value is "simple". This property maps directly to the optimize URL query arg for the Aggregator servlet.
define(["dojo/connect", "dojo/query"], function(connect, query) { . . . });
define("js/moduleA", ["dojo/connect", "dojo/query"], function(connect, query) { . . . });
|