Commit Graph

94 Commits

Author SHA1 Message Date
Tobias Koppers 831e71c797 make argument of DependencyTemplate an object 2018-08-02 16:07:29 +02:00
Tobias Koppers f5a457ffd4 add ExportsSpec type to getExports 2018-08-02 16:04:10 +02:00
Tobias Koppers f68c1f7ab6 add additional arguments to updateHash 2018-08-02 16:04:10 +02:00
Tobias Koppers d6f8e49c3a refactor getInitFraments to take TemplateContext
add a hack to include the current module as property in source
later we will refactor DependencyTemplate.apply to take a TemplateContext too
2018-07-30 23:07:50 +02:00
Tobias Koppers 5ae9491501 comments, renames 2018-07-30 23:07:30 +02:00
Tobias Koppers c5c4f6bdd3 remove DependencyTemplate.getInitFragments.source 2018-07-30 22:42:01 +02:00
Tobias Koppers e79d4e002b add stage to InitFragment 2018-07-30 22:39:04 +02:00
Florent Cailhol 6ea5a4ad22 Add types 2018-07-30 22:37:10 +02:00
Florent Cailhol 12f3c0f34e Fix TypeError when no import fragments are emitted 2018-07-30 22:36:39 +02:00
Florent Cailhol 55b73a54af Return null when no InitFragment is required 2018-07-30 22:36:23 +02:00
Florent Cailhol dcebd57aa4 Replace harmonyInit calls by InitFragments 2018-07-30 22:34:18 +02:00
Tobias Koppers cf5f1d723c format existing code 2018-07-30 21:29:21 +02:00
Tobias Koppers 2fa351a178 make ExportMode.module a callback function
fix comment
2018-07-26 15:53:11 +02:00
Florent Cailhol 60ef6a6a30 Make DependencyReference dynamic 2018-07-26 15:31:04 +02:00
Tobias Koppers eba85a491d add types to Dependency and subclasses 2018-07-25 09:33:48 +02:00
Tobias Koppers 93a28126a6 fixes order for reexported dependencies
fixes #7665
2018-07-05 20:40:19 +02:00
Tobias Koppers be896f2b34 fix bug 2018-06-23 15:30:04 +02:00
Tobias Koppers 3502287bbb emit correct code for reexport unused exports 2018-06-23 15:13:17 +02:00
Tobias Koppers b4699c0657 add order for DependencyReference
and add types for touched code
2018-06-08 13:20:57 +02:00
Florent Cailhol 2a9452e51b Add brackets for multiline if/for statements 2018-05-29 15:45:44 +02:00
Tobias Koppers 770847171d Merge branch 'master' into bugfix/namespace-object
# Conflicts:
#	lib/RuntimeTemplate.js
2018-05-28 22:42:21 +02:00
Tobias Koppers 115a72ce50 SideEffectsPlugin don't modify cache entries
fixes #7400
2018-05-27 21:53:21 +02:00
Tobias Koppers a926a19715 create better namespace objects
avoid using Object.assign (fixes #7162)
2018-05-03 12:55:00 +02:00
Mohsen Azimi 6f6c12cde2
Add test (I have no idea what I am doing) 2018-04-05 23:18:25 -07:00
Mohsen Azimi 8001f03b14
Merge branch 'set-concat' of github.com:mohsen1/webpack into set-concat 2018-04-05 23:04:57 -07:00
Mohsen Azimi aa536b7be1
Merge branch 'master' of github.com:webpack/webpack into set-concat 2018-04-05 23:03:00 -07:00
Florent Cailhol 5c8a4bb89f Unify Dependency#getExports result 2018-04-04 13:53:55 +02:00
Tobias Koppers f3c9bd01b9
Merge pull request #6953 from webpack/refactor/mode_deopt
Change internal representation of harmony export modes
2018-04-04 12:30:11 +02:00
Tobias Koppers e65751ac6f
Merge pull request #6932 from mohsen1/hideStack
Add HarmonyLinkingError class
2018-04-04 11:06:39 +02:00
Florent Cailhol 24a5699f39 Remove extraneous debug statement 2018-04-04 10:56:02 +02:00
Florent Cailhol 0596346dbc Always pass first argument of 'getMode' 2018-04-04 10:45:27 +02:00
Florent Cailhol 97c6703aab Make 'getReference' monomorphic 2018-04-04 10:45:27 +02:00
Florent Cailhol 8570165c1f Use a class for dependency references 2018-04-04 09:17:10 +02:00
Mohsen Azimi 793bee2007
Update HarmonyExportImportedSpecifierDependency.js 2018-04-03 22:54:22 -07:00
Mohsen Azimi 49637a2507
Update HarmonyExportImportedSpecifierDependency.js 2018-04-03 22:44:37 -07:00
Mohsen Azimi 96b0457ba8
Use add() to append items to activeExports set in HarmonyExportImportedSpecifierDependency 2018-04-03 21:36:14 -07:00
Mohsen Azimi 3e49fcd0a9
CR feedback 2018-04-03 21:10:07 -07:00
Mohsen Azimi 4ae95a6892
Add HideStackError class for errors that have hideStack = true 2018-04-02 09:58:07 -07:00
Florent Cailhol f1092ad516 Update prettier toolchain 2018-03-26 16:56:10 +02:00
Tobias Koppers cda226a333 handle reexporting json default export correctly
fixes #6700
2018-03-20 11:10:05 +01:00
Josh Soref f3c2de9fcf spelling: harmony 2018-02-26 02:31:00 +00:00
Tobias Koppers 5238159d21 run prettier on existing code 2018-02-25 02:00:20 +01:00
EugeneHlushko 2aab060f26 Refactor: indexOf >< checks to includes 2018-01-11 18:58:39 +02:00
Tobias Koppers 53a1d6c7b5 replace harmonyModule flag with exportsType 3-state
exportsType falsy: It's non-harmony module
exportsType "namespace": It's a harmony module, the exports is the namespace object
exportsType "default": It's a harmony module, the exports is the default exports, named exports are properties of the default export
2017-12-22 19:42:41 +01:00
Tobias Koppers 2aac6badd5 move generated runtime code to RuntimeTemplate 2017-12-22 19:41:28 +01:00
Tobias Koppers c68f224272 move providedExports into buildMeta 2017-12-12 17:01:03 +01:00
Tobias Koppers ffb977fed4 refactor meta -> buildMeta, add factoryMeta
add compat layer to Module.meta
2017-12-12 16:57:50 +01:00
Tobias Koppers 758a388f69 pass runtimeTemplate to DependencyTemplate
move outputOptions and requestShortener into runtimeTemplate
2017-12-11 17:59:32 +01:00
Tobias Koppers 2201b860a5 Add mode option and choose defaults depending on mode
add optimization options
use development mode for watch/hot/config tests
use production mode for integration/stats tests
create output directory if not existing
move __esModule to runtime
fix dependency behavior for cases without usedExports
2017-11-24 08:17:17 +01:00
Tobias Koppers 21cdc84b71 process imports from mjs to non-esm correctly
give nice error messages when importing non-esm the wrong way
It also disallows using namespace object from non-esm modules

fixes #5686
2017-11-23 14:10:52 +01:00