Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix paths in example of multiple bundles #1423

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions readme.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -318,23 +318,23 @@ module.exports = function (s) { return s.toUpperCase() + '!' };
```

```
$ browserify -r ./robot.js > static/common.js
$ browserify -x ./robot.js beep.js > static/beep.js
$ browserify -x ./robot.js boop.js > static/boop.js
$ browserify -r ./robot.js > bundle/common.js
$ browserify -x ./robot.js beep.js > bundle/beep.js
$ browserify -x ./robot.js boop.js > bundle/boop.js
```

Then on the beep page you can have:

``` html
<script src="common.js"></script>
<script src="beep.js"></script>
<script src="bundle/common.js"></script>
<script src="bundle/beep.js"></script>
```

while the boop page can have:

``` html
<script src="common.js"></script>
<script src="boop.js"></script>
<script src="bundle/common.js"></script>
<script src="bundle/boop.js"></script>
```

This approach using `-r` and `-x` works fine for a small number of split assets,
Expand Down