Skip to content

Commit 0ba7d85

Browse files
Yuliang-Leeskipjack
authored andcommitted
docs(config): simplify libraryTarget docs (#1774)
Make libraryTarget's Module-Definition-Systems part consistent with others parts and change the code to be the same as real code.
1 parent 7621eac commit 0ba7d85

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/content/configuration/output.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ The generated output will be defined with the name "MyLibrary", i.e.
466466
467467
``` js
468468
define("MyLibrary", [], function() {
469-
// This module return value is what your entry chunk returns
469+
return _entry_return_;
470470
});
471471
```
472472
@@ -482,7 +482,7 @@ If `output.library` is undefined, the following is generated instead.
482482
483483
``` js
484484
define([], function() {
485-
// This module returns is what your entry chunk returns
485+
return _entry_return_;
486486
});
487487
```
488488
@@ -512,8 +512,8 @@ And finally the output is:
512512
exports["MyLibrary"] = factory();
513513
else
514514
root["MyLibrary"] = factory();
515-
})(this, function() {
516-
//what this module returns is what your entry chunk returns
515+
})(typeof self !== 'undefined' ? self : this, function() {
516+
return _entry_return_;
517517
});
518518
```
519519
@@ -537,8 +537,8 @@ The output will be:
537537
var a = factory();
538538
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
539539
}
540-
})(this, function() {
541-
//what this module returns is what your entry chunk returns
540+
})(typeof self !== 'undefined' ? self : this, function() {
541+
return _entry_return_;
542542
});
543543
```
544544

0 commit comments

Comments
 (0)