Commit Graph

167 Commits

Author SHA1 Message Date
Mohsen Azimi 7b07a8db66 Upgrade to Prettier 2 2020-03-28 18:20:24 -04:00
evilebottnawi dafa4cd69a chore: setup cspell 2020-03-12 19:51:26 +03:00
Nitin Kumar 285529a643
chore: fix typos across the project 2020-03-10 07:29:46 +05:30
Tobias Koppers 6477ca56f8 Split options defaulting in normalization and defaults
Apply defaults after plugins are applied to allow plugins to feature their own defaults.
This allows to make preset plugins.
2020-02-17 19:12:54 +01:00
Tobias Koppers 522d80f33b allocate less for empty Sets for runtime requirements and file/context/missingDependencies 2020-01-29 21:46:14 +01:00
Tobias Koppers 1070ce925b remove Array.prototype.reduce calls to simplify code 2020-01-17 18:31:29 +01:00
jamesgeorge007 d97b4bd195 fix: typo 2020-01-17 17:59:04 +05:30
jamesgeorge007 39b3f4523c fix: typo 2020-01-17 17:57:37 +05:30
Tobias Koppers 782e4535ac Refactor how exportsType work
add flagged exportsType for __esModule flagged
add getExportsType to merge strict with exportsType
move CommonJsStuffPlugin into CommonJsPlugin
split CommonJsPlugin into imports and exports part
enable minimal tree shaking for CommonJs imports and exports
2019-12-06 11:13:08 +01:00
Sergey Melyukov 4b499b0429 minor fixes 2019-12-03 17:05:22 +03:00
Sergey Melyukov ba306b6f2c Merge remote-tracking branch 'upstream/master' into optimize-webpack-runtime-size 2019-12-02 19:54:21 +03:00
Sergey Melyukov 6b59d113a4 optimize webpack runtime size 2019-12-02 17:59:37 +03:00
Tobias Koppers 5a01ed8121 rename exportsType named to default
exportsType default doesn't include named exports in strict esm
2019-11-20 12:43:53 +01:00
Tobias Koppers b90f3e14a1 upgrade webpack-sources
make source maps and source names context independent

add enhanced-resolve declarations
add types to Module.build
fix tooling for import order to support import renaming
add support for concatenated modules in eval source maps
2019-11-12 08:59:08 +01:00
Tobias Koppers ddc3dae0e6 refactor Module.source() and Module.getRuntimeRequirements() into Module.codeGeneration
add code generation phase to Compilation
add `output.iife` options to remove iife wrapper
add `experiments.outputModule` which enabled `output.module`
add `output.module` which sets defaults to `output.iife: false`, `output.libraryTarget: "module"`, `output.jsonpScriptType: "module"`, `terserOptions.module: true`
add `output.module` example
improve runtime requirements needed by ConcatenatedModule
add entry inlining, which inlines entry module code into runtime scope (only when safe)
make whole bundle strict when all modules are strict
2019-10-08 23:59:48 +02:00
Tobias Koppers b80174a069 Improve backward-compat for various things
to enable mini-css-extract-plugin
2019-09-26 22:06:54 +02:00
Tobias Koppers d3cf3928f5 Persistent Caching fixes
improve error handling in pack file cache strategy
support context timestamp snapshot
make ContextModule serializable
fix snapshotting bug of managed paths
use managed and immutable path info for context hashes and timestamps
enabled managedPaths for node_modules during cache tests
2019-09-04 16:33:54 +02:00
Tobias Koppers e507392094 add output.ecmaVersion options to set emitted code style
fix a bug with prefetching initial chunks
InitFragments have get[End]Content methods which get a sourceContext
RuntimeModules have implicit chunk and compilation
changed default to `output.ecmaVersion: 2015`
2019-08-26 21:32:29 +02:00
Tobias Koppers b2e7837288 replace Object.assign with object spread 2019-06-19 13:16:05 +02:00
Tobias Koppers e4ba79f0b8 add type coverage for ContextModuleOptions and GroupOptions 2019-06-14 11:44:54 +02:00
Tobias Koppers 6db94536ad Merge tag 'v4.34.0' into next
4.34.0
2019-06-13 10:51:12 +02:00
Tobias Koppers 0c39719729 avoid zero sized modules as they lead to problems 2019-05-13 12:29:29 +02:00
Tobias Koppers 61445a5ed0 Merge tag 'v4.29.3' into next
4.29.3
2019-02-07 09:41:34 +01:00
Tobias Koppers 7a5137d7c4 fixes in ContextModule
avoid generating __webpack_require__.e when no chunks are used
add optimized lazy mode when no chunks and no fake make are used
improve module id check
2019-02-06 17:51:16 +01:00
Tobias Koppers d40f7b2642 cache contextify and pass associatedObjectForCache to all calls 2019-01-19 12:40:00 +01:00
Florent Cailhol f05af4a4a7 Use serialization API instead of ObjectMiddleware 2018-12-28 13:54:10 +01:00
Tobias Koppers 1374757006 remove ModuleReason
remove HotUpdateChunkTemplate
move compareLocations into comparators
re-enable NodeSourcePlugin for `.mjs`
2018-12-20 16:38:26 +01:00
Tobias Koppers 5563ee9e58 use makePathsRelative instead of contextify
unify contextify and makePathsRelative
separate NormalModuleFactory ignored, ContextModule and ConcatenatedModule identifier with "|"
2018-12-07 18:12:04 +01:00
Tobias Koppers cc34ea42b0 add type argument to Module.size
add getSize to Generator
2018-12-05 20:18:59 +01:00
Tobias Koppers bf1fc171ba runtime requirement for RuntimeGlobals.moduleFactories 2018-11-29 16:08:52 +01:00
Tobias Koppers 7c37a6a972 handle runtime requirements 2018-11-29 16:07:17 +01:00
Tobias Koppers c1e89c0543 Runtime requirement support in NormalModule, Generators and DependencyTemplate 2018-11-29 16:06:12 +01:00
Tobias Koppers 0232674f9c Initial runtime module work 2018-11-29 16:03:32 +01:00
Florent Cailhol be8c6bbe71 Add types on module files 2018-11-07 14:03:25 +01:00
Tobias Koppers eb28697419 move magic property names on __webpack_require__ into RuntimeGlobals file 2018-11-05 15:28:34 +01:00
Tobias Koppers 83866b0dac use stable sorting for sorting dependencies 2018-10-23 11:32:32 +02:00
Tobias Koppers 4b69df1117 allow to make classes not-serializable
make ContextModule not-serializable because it's not needed
2018-10-18 15:52:22 +02:00
Tobias Koppers f23ce49040 remove module argument from AsyncDepBlock
reorder/remove arguments of ImportDepBlock, AMDRequireDepBlock, RequireEnsureDepBlock
2018-10-17 23:07:01 +02:00
Tobias Koppers 7340fbb547 refactor Cache
add a new hookable Cache class
removed CachePlugin
add MemoryCachePlugin
refactor timestamps
create FileSystemInfo class
2018-09-27 13:20:19 +02:00
Tobias Koppers 4eab41bd5f refactor Module.needBuild to be async 2018-09-27 11:20:54 +02:00
Tobias Koppers 554b417546 Modules are responsible for sorting of dependencies 2018-09-27 11:20:42 +02:00
Tobias Koppers 5b4cbb5ee0 add queues to Compilation
remove Semaphore and use AsyncQueue instead
deprecate Module.needRebuild, add Module.needBuild
remove Module.unbuild
add Module.invalidateBuild
2018-09-12 13:17:03 +02:00
Tobias Koppers bad9d8a271 move Module.id into ChunkGraph
remove disconnect and unseal from Module
2018-08-28 15:08:52 +02:00
Tobias Koppers 02b15a1b46 pass chunkGraph to updateHash instead of moduleGraph
pass chunkGraph to compareModulesById instead of moduleGraph
pass chunkGraph to methods of RuntimeTemplate
use comparators from module at some places
2018-08-28 12:06:53 +02:00
Tobias Koppers 670502fc81 Move AsyncDependenciesBlock.chunkGroup into ChunkGraph 2018-08-22 20:17:49 +02:00
Tobias Koppers eb63cf80d6 move built flag into Compilation 2018-08-22 15:33:16 +02:00
Tobias Koppers 381e2db200 replace Module.reasons and Dependency.module with ModuleGraph 2018-08-02 17:54:44 +02:00
Tobias Koppers 11e127d162 pass moduleGraph along with multiple methods 2018-08-02 17:54:42 +02:00
Tobias Koppers ec1329a7d4 make libIdent required
add types
2018-08-02 16:29:20 +02:00
Tobias Koppers 4ce109f8c1 change arguments of Generator.generate and Module.source into a object to be easier extensible
add JavascriptModulesPlugin.getHooks().shouldRender to decide if a module should be rendered
2018-08-02 16:07:29 +02:00