Skip to content

2.4.0

Compare
Choose a tag to compare
@m-mujica m-mujica released this 24 Jul 20:45
· 89 commits to master since this release

Slim format

The slim format transform was introduced in previous pre-releases and it's shipped now as part of this release.

Add CJS dependencies to the AMD define function

This release changes the transpile output when there is a CJS to AMD transform so dependencies are passed as the second argument to the define function.

E.g, before 2.4.0 the following code:

var foo = require("foo");
foo();

would be transpiled to the AMD simplified CommonJS wrapper format:

define(function(require, exports, module) {
  var foo = require("foo");
})

With 2.4.0, the same source file would be transpiled to:

define(["require", "exports", "module", "foo"], function(require, exports, module) {
  var foo = require("foo");
})

The "duplicated" dependency is added to make sure the loader can execute the module even if it can't detect the dependency correctly. See stealjs/steal-tools#792 (comment)