Skip to content

Commit

Permalink
Merge pull request #137 from 2hu12/patch-1
Browse files Browse the repository at this point in the history
Update "define.alias" API description
  • Loading branch information
rwjblue committed Apr 9, 2018
2 parents d5fb086 + 367dbfc commit d42a2c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -19,15 +19,15 @@ loader.noConflict({

## Extra stuff

### `define.alias('new-name', 'old/path')`
### `define.alias('old/path', 'new-name')`

`define.alias` allows creation of a symlink from one module to another, for example:

```js
define('foo/bar/baz', [], () => 'hi');
define('foo', [], () => 'hi');
define.alias('foo', 'foo/bar/baz');

require('foo') // => 'hi';
require('foo/bar/baz') // => 'hi';
require('foo') === require('foo/bar/baz');
```

Expand Down

0 comments on commit d42a2c7

Please sign in to comment.