• property
config.main {moduleName | Array<moduleName>}  

The name of the module(s) that loads all other modules in the application.


The main module to load after configMain.


An array of main modules that will be loaded after configMain.


This is the starting point of the application. In development, the main module is loaded after the configMain and @dev modules. In production, only the main module is loaded, but it is configured to load in a bundle.

Main should be configured by one of the approaches in config.

Use with npm

In development, your application's package.json will be read and the main module set automatically. For instance, if your package.json looks like:

  "main": "my/main.js",

The following will load package.json with the npm module and automatically load my/main.js:

<script src="../node_modules/steal/steal.js">

In production, make sure your script specifies main so the correct bundle to load can be known.

Help us improve StealJS by taking our community survey