Commit Graph

42 Commits

Author SHA1 Message Date
Chris Joel 9a1034fa87 Fixes #5843 2017-10-18 12:48:52 -07:00
Minh Nguyen 2bedd6cffa Only use UMD or UMD2 externals for UMD libraryTarget. Resolve #5766 2017-10-10 13:22:58 +01:00
Adam Thomann 15f4894ebe Convert bind(this) to arrow functions 2017-08-11 01:52:25 -04:00
Tobias Koppers 3e3b7489b4 Merge pull request #4883 from AndersDJohnson/library-target-umd-names-per-target
feat: library target UMD supports names per target
2017-06-21 22:51:27 +02:00
Tobias Koppers 9cd0cacd14 Merge branch 'master' into next 2017-06-03 16:36:38 +02:00
Richard Simko 0c985091ed Error if externals are missing instead of outputting undefined. webpack/webpack#4771 2017-06-02 17:20:05 +02:00
Anders D. Johnson 913b18b4bb
fix: update hashes for all library names 2017-05-29 15:28:40 -05:00
Anders D. Johnson 0ab7b1ae4d
feat: library target UMD supports names per target 2017-05-29 13:49:34 -05:00
Tobias Koppers 2bd2d2844c improve a few issues
from review by @Kovensky
2017-05-20 14:54:42 +02:00
Tobias Koppers e1bac32c19 Use a Set to store modules in a chunk 2017-05-16 11:50:50 +02:00
Tobias Koppers 1a766694dd fixes spacing and typo 2017-02-28 12:03:29 +01:00
Tobias Koppers 3fd3b47c62 formating 2017-02-28 11:41:06 +01:00
Will Mendes 7fff6baf8d Merge branch 'master' into refactor-umd-main-template-plugin 2017-02-26 11:29:57 +11:00
Will Mendes 07fa9a0fdb refactor(UmdMainTemplatePlugin): upgrade to ES6 2017-02-22 19:37:53 +11:00
Tim Sebastian 3515fddb53 escape __WEBPACK_EXTERNAL_MODULE_ through Template.toIdentifier 2017-02-20 19:17:51 +11:00
Kees Kluskens 644e3a009b Upgrade eslint (#3626)
* Upgrade eslint

* Pin down eslint version

* Temporary fix for difference between js-beautify and eslint

js-beautify suddenly requires a space between `while` here,
but everywhere else we use it without space.

* Remove redundant rules (present in eslint:recommended)

* Add rules comparable to js-beautify rules to eslint

* Add some forgotten files

* Ugh, fix some differences between eslint and js-beautify the nuclear way

* Add back variables
2016-12-29 10:10:41 -06:00
Tushar Sonawane 1e44775bb0 fix #2096
- matching the semi-colons to correct places for UMD builds
2016-10-29 21:14:38 +05:30
Larkin Family 6daa860f47 Updated test cases for better coverage 2016-03-12 16:23:53 -06:00
Larkin Family e6dcf5305a removed obsolete function breaking code coverage, derp 2016-02-29 16:25:05 -06:00
Sean Larkin 493f6e9b3c Was noticing undefined comments in cases, this fixes that 2016-02-29 13:48:21 -06:00
Sean Larkin c3198a9e28 Changed logic so that empty lines of
'//  \n' don't appear in UMD wrapper
2016-02-29 11:09:17 -06:00
Larkin Family ff168bbb2f realized that comments need return lines so that it doesn't break the subsequent line of logic 2016-02-27 15:01:00 -06:00
Larkin Family 86c5947904 Added tests and fixed spelling error causing initial tests to fail 2016-02-27 01:01:49 -06:00
Sean Larkin 164e33bd86 Fixed strings 2016-02-26 16:50:04 -06:00
Sean Larkin b607e97124 Adding auxiliary comments option for UMD wrapper 2016-02-26 14:25:53 -06:00
Kenny Tran eebc5ceaf6 Fix no-redeclare in code 2016-01-18 18:57:42 -08:00
Tobias Koppers ded70aef28 moves stuff from webpack-core to webpack-sources 2015-12-29 17:44:55 +01:00
Espen Volden db21a79587 Add option `umdNamedDefine` to toggle naming 2015-08-26 11:50:42 +02:00
Espen Volden dd5d8660d4 Name AMD module in UMD target if library is set
In the AMD target the AMD module gets named, but in the UMD target its
is always anonymous, even if `library` is set in the config.

This patch names the AMD module if `library` is set.

See the discussion in the referenced issue to see the background for
this change.

If its a multi part library it uses the last key in the same was as it
does with the exports hash part of the UMD declaration. Is this the best
solution?

Resolves webpack/issues/989
2015-08-24 16:47:39 +02:00
Alberto Leal 59656c9717 define call should include empty dependencies list
see: https://github.com/umdjs/umd/pull/34

> Without this, the factory may be scanned for additional dependencies matching the literal string require("module-id"), which is not correct. See https://github.com/amdjs/amdjs-api/wiki/AMD#simplified-commonjs-wrapping-.
2015-08-19 05:55:34 -04:00
Tobias Koppers f7d799adb4 rebeautify without spacing after keyword 2015-07-16 00:19:23 +02:00
Avi Haiat 0a340f2b1a feat(app): Beautify all lib files 2015-07-13 01:20:09 +03:00
Tobias Koppers 738c1d3e68 support library with CommonsChunkPlugin
fixes #622
2014-12-22 16:10:23 +01:00
Jason Anderson f371945a29 Add TemplatedPathPlugin 2014-09-11 15:31:08 +02:00
Tobias Koppers 0380796af2 Merged PR #362
code style fixes
2014-08-27 16:25:28 +02:00
Jordan Klassen 95ab7a9960 Merge remote-tracking branch 'origin/master' into optional-require-as-global
Conflicts:
	lib/UmdMainTemplatePlugin.js
2014-08-19 10:23:33 -07:00
Quentin Raynaud 3c4284f011 add a semi-colon at the end of the UMD template
Rationale: the missing semi-colon can cause bugs in some edge cases where webpack
is used to generate a library that will be concatenated in dependent project.
2014-08-03 16:05:40 +02:00
Jordan Klassen 562c446a73 add 'umd2' libraryTarget for optional amd dependancies as globals 2014-07-22 01:45:14 -07:00
Jordan Klassen 6eac904631 Optional externals in amd use globals instead of an explicit dependency
There isn't any mechanism in the amdjs spec to provide optional
dependancies (although a requirejs loader plugin could do that, it's not
standard). The best approach found was knockout's optional dependancy on
jquery, for which it doesn't use require, it only uses globals.

This solution will need to be improved for use of requirejs/amd in
commonjs environments, and could be toggled with a flag.
2014-07-17 01:42:44 -07:00
Tobias Koppers 03c87c11a4 support [name] in chunkFilename
fixes #358
2014-07-17 01:52:41 +02:00
Tobias Koppers 5104661855 optional externals
track optional modules
optional externals for UMD and root
fixes #339
2014-07-03 00:00:06 +02:00
Tobias Koppers 3247725ba3 refactored MainTemplate to plugin interface 2014-06-02 21:23:53 +02:00