Tobias Koppers
568601c7fa
remove `exec` from loader context
...
`require-from-string` can be used instead
2018-07-11 17:48:47 +02:00
Tobias Koppers
e0abce0dd8
make DependencyTemplates a new class
2018-07-11 13:11:08 +02:00
Tobias Koppers
fb2c24bf76
add `splitChunks.maxSize` option
...
add `splitChunks.fallbackCacheGroup`
add `splitChunks.hidePathInfo`
move `contextify` into utils
add some types
2018-07-04 10:45:02 +02:00
Tobias Koppers
deb798d8a7
add TODO comment
2018-06-25 16:42:19 +02:00
Tobias Koppers
41343d1763
add TODO comments
2018-06-25 16:18:21 +02:00
Sean Larkin
c3ebef7f25
Merge branch 'master' into feature/type-compiler-compilation-save
2018-06-21 11:07:33 +03:00
Tobias Koppers
6a7e79a443
Convert non-Error errors into Errors
2018-06-05 13:41:00 +02:00
Tobias Koppers
1886ee0f3f
improve final loader not string/buffer message
...
add test case
2018-06-05 11:58:10 +02:00
Tobias Koppers
9fbe914078
Merge branch 'master' into feature/module-build-error-with-loader-name
...
# Conflicts:
# lib/ModuleBuildError.js
# lib/ModuleError.js
# lib/ModuleWarning.js
2018-06-05 10:23:00 +02:00
Ma Cheng
e68d83e8c7
Fix Typo
2018-06-02 17:41:35 +08:00
Ma Cheng
957ee2a63e
Merge branch 'master' into feature/module-build-error-with-loader-name
2018-06-02 17:19:16 +08:00
Tobias Koppers
530e1fb172
Add matchResource feature (for loaders)
...
Match rules with custom resource name
Also use this name as rule.issuer or splitChunks test
Show nicely in stats
2018-06-01 15:37:17 +02:00
Sean Larkin
1bae93852a
Merge branch 'master' into feature/type-compiler-compilation-save
2018-05-30 19:35:36 -07:00
Florent Cailhol
2a9452e51b
Add brackets for multiline if/for statements
2018-05-29 15:45:44 +02:00
Sean Larkin
761d73b4e7
chore(types): add Compiler and Compilation type support
2018-05-15 15:04:38 +02:00
Tobias Koppers
f2ad440de8
More strict linting of jsdocs
...
Use TODO over any when type is possible
2018-05-08 14:53:33 +02:00
Tobias Koppers
9bc9c75f9d
Merge branch 'master' into next
...
# Conflicts:
# test/__snapshots__/StatsTestCases.test.js.snap
2018-05-04 12:02:30 +02:00
Tobias Koppers
ff950e732b
Use hex encoding instead
2018-05-02 18:11:48 +02:00
Tobias Koppers
214801493e
improve NormalModule performance
...
cache source and meta hash
2018-05-02 14:20:30 +02:00
mc-zone
8060ec6a24
Merge branch 'master' into feature/module-build-error-with-loader-name
2018-04-29 16:57:05 +08:00
Tobias Koppers
82a71be1dc
Cleanup, refactoring, types
2018-04-27 18:53:07 +02:00
Mohsen Azimi
c7429a67fe
Fixed all type errors!
2018-04-12 11:42:39 +02:00
Mohsen Azimi
2367a7da3d
More comments
2018-04-12 11:42:37 +02:00
Mohsen Azimi
7bc38d4bf4
CR feedback
2018-04-03 21:14:18 -07:00
Mohsen Azimi
10d6067818
Use a Map for dependencyTemplatesHashMap instead of a WeakMap
2018-03-31 19:38:00 -07:00
Tobias Koppers
93a5bf567f
fixes for mini-css-extract-plugin
2018-03-28 16:19:15 +02:00
Florent Cailhol
3983803d30
Destructure 'require' to improve readability
2018-03-22 12:05:58 +01:00
mc-zone
9c13d51141
improve message format; prevent destructure crash; improve tests;
2018-03-18 22:56:36 +08:00
mc-zone
ce63b53522
remove loader origin name and purify
2018-03-02 17:57:46 +08:00
Josh Soref
c9bb7b7707
spelling: successful
2018-02-26 02:48:51 +00:00
Tobias Koppers
5238159d21
run prettier on existing code
2018-02-25 02:00:20 +01:00
Florent Cailhol
63b4523a15
Pass 'context' as constructor argument
2018-01-30 21:40:44 +01:00
Tobias Koppers
5c63d3cb43
move source generation into separate module
...
allow to pass a Generator to NormalModule
change NormalModule constructor to options object
🍆
2018-01-24 11:33:38 +01:00
Tobias Koppers
7a1b357aad
Merge branch 'next' into for_of_loops
2018-01-24 09:01:31 +01:00
Florent Cailhol
d4811b0d37
Use for-of loops instead of forEach
2018-01-23 22:53:18 +01:00
Evan Scott
1f29fa9b51
perf: refactor various timestamp caches into ES6 Maps
...
This change satisfies https://github.com/webpack/webpack/issues/6234
which desires to change the timestamp caches from plain objects to
the ES6 Map type to avoid deopts, since v8 expects things to be
added to Maps but objects are only fast if properties aren't added
dynamically after initial assignment.
2018-01-23 02:30:22 -05:00
Florent Cailhol
7f303e5260
Use Buffer.from instead of new Buffer
2018-01-22 17:23:34 +01:00
Florent Cailhol
c0d1994196
Fix Resolver#resolve deprecated call
2017-12-31 18:14:23 +01:00
Tobias Koppers
91e6692362
extract exports from wasm module
...
mangle used exports
fix esm flag
2017-12-14 13:05:03 +01:00
Tobias Koppers
e829a5ed71
Reset dependencies in unbuild
...
Elsewise they are cleared in disconnect and module removing doesn't work correctly
2017-12-12 17:01:14 +01:00
Tobias Koppers
aae32c770b
cache buildMeta
2017-12-12 16:58: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
2acd0d410e
make `Module.hash` official and use it for caching
2017-12-04 12:23:43 +01:00
Tobias Koppers
7787b4ad13
upgrade tapable for Compilation
2017-11-27 21:14:16 +01:00
Tobias Koppers
a0ef93f939
aggregate all crypto hash usages into util/createHash
...
try to avoid calling hash.update with short strings
2017-11-23 11:09:17 +01:00
Tobias Koppers
5e39ec46ee
Allow to override resolve configuration
2017-11-18 08:12:35 +01:00
Tobias Koppers
00f2b5ede7
advanced module type refactoring
...
added json type
.mjs default to javascript/esm type
adjusted parser plugins to react on module type
2017-11-11 19:27:19 +01:00
Tobias Koppers
41a1d602e1
added WebAssembly Proof of Concept
2017-11-10 09:17:11 +01:00
Tobias Koppers
860da9baaa
Merge branch 'next' into refactor/sets
2017-11-08 21:28:51 +01:00
Tobias Koppers
f7c2f8e470
Update code style to arrow functions
2017-11-08 11:56:01 +01:00
Tobias Koppers
88ecff4fb9
getHighestTimestamp is no longer used
2017-11-08 11:29:58 +01:00
Tobias Koppers
447d85ad79
Merge branch 'next' into refactor/sets
...
# Conflicts:
# lib/ContextModule.js
# lib/NormalModule.js
# lib/optimize/ConcatenatedModule.js
2017-11-08 06:01:24 +01:00
Tobias Koppers
51c572c4f5
refactor more properties to Sets
2017-11-07 09:17:12 +01:00
Tobias Koppers
52bacce0d7
Merge branch 'next' into refactor/cleanup-stuff
2017-11-07 09:15:15 +01:00
Tobias Koppers
e39e9c134c
fix missing negation
2017-11-06 14:43:35 +01:00
Tobias Koppers
0339d4da49
Refactor weird things
...
* Declare used properties in constructor
* Module.(re)building moved into Compilation._(re)buildingModules (Map)
* Make NormalModule.error private
* Move Module.cacheable logic into needRebuild
* More stable implemention of rebuildModule
* addModuleChain waits for Module building finished before returning
* Set built and cacheable flags correctly in Modules
* More portableId into WeakMap
* Add ModuleReason for entrypoints
* cacheable can be true/false/null in Stats
* added Stats module issuerPath
* fixes profile in stats output
2017-11-06 13:16:09 +01:00
Tobias Koppers
9e42dd6c4a
allow to pass AST directly to webpack
2017-11-03 11:12:45 +01:00
Tobias Koppers
a4d63e4051
remove loader context options, add rootContext
2017-09-14 09:19:21 +02:00
Tobias Koppers
d1bd5fa2db
remove resolveSync
2017-09-14 08:59:09 +02:00
donocode
174fd4e21b
Prevent NormalModule contextify from contextifying query parameters
...
When passing a path as part of a loader query string the contextify
function incorrectly modifies the query string paths, most notably
converting windows separators
2017-08-29 23:50:22 +02:00
Evan Scott
a426f93353
refactor: remove some excess array iterators
2017-07-18 03:17:39 -04:00
Tobias Koppers
c1a02446ac
store hash in depndencyTemplates Map instead of comparing identify
...
This restores original performance on incremental builds
fixes #5289
fixes #5277
2017-07-14 13:03:30 +02:00
Tobias Koppers
7f8d5b2aa5
Merge branch 'master' into next
2017-06-05 11:07:44 +02:00
Suman
6c2f378fac
Adding function support to noParse
2017-06-02 20:28:54 -04:00
Tobias Koppers
9b2a9fa786
Scope Hoisting
2017-05-21 09:15:41 +02:00
J Huang
6afc397b99
perf: use Date.now() instead of new Date().getTime()
...
new Date().getTime() is 2x slower than Date.now(), see https://jsperf.com/new-date-vs-date-now-vs-performance-now/6
2017-05-04 10:19:54 +08:00
Jarid Margolin
70e48d2c31
Create base WebpackError class with inspect method.
2017-04-03 10:42:53 -04:00
Sergey Melyukov
0cab30c950
added test for NormalModule.originalSource
2017-04-03 10:48:55 +03:00
Sergey Melyukov
9d8d32e1ed
added originalSource method to NormalModule ( closes #4526 )
2017-04-03 10:33:11 +03:00
Tobias Koppers
751fd9bbc4
add stack to non-Error error emitted
...
add info about emitting an Error
#4518
2017-03-22 13:29:40 +01:00
Tim Sebastian
db2626595c
fix test and linting
2017-02-16 19:31:58 +11:00
Tim Sebastian
c06b0665d2
apply review tasks
2017-02-16 08:01:09 +11:00
Tim Sebastian
3812c101b1
add tests for preventParsing and applyNoParseRule
2017-02-14 21:14:57 +11:00
Tim Sebastian
eb2d6d6d5f
add tests for NormalModule
2017-02-14 20:38:47 +11:00
Tim Sebastian
c71840a6ad
refactor part 2, add comments
2017-02-14 00:16:54 +11:00
Tim Sebastian
fcac9a3fe4
refactor variable cleanup code generation, step one
2017-02-13 23:13:07 +11:00
Tim Sebastian
4d378f51bd
untangle source method
2017-02-13 22:18:15 +11:00
Tim Sebastian
a5d5b9ef55
simplify error handling and simplify markModuleAsErrored as its always called with an error
2017-02-13 21:38:55 +11:00
Tim Sebastian
b9507cca99
apply review tasks
2017-02-13 00:08:41 +11:00
Tim Sebastian
80e7d4070f
fix typo
2017-02-11 17:07:18 +11:00
Tim Sebastian
7d36c5b7eb
extract asset source creation to own method
2017-02-11 17:07:01 +11:00
Tim Sebastian
1e4d9297b4
split out noParse check for modules
2017-02-11 16:59:58 +11:00
Tim Sebastian
93377f7bc4
refactor needRebuild to make use of early return if possible
2017-02-11 16:10:07 +11:00
Tim Sebastian
128e04365b
use const for source, as let is no longer necessary
2017-02-11 15:59:35 +11:00
Tim Sebastian
2a66bb47cd
use arrow function to bind `this` and remove indirection over local "module" variable
2017-02-11 15:59:08 +11:00
Tim Sebastian
d4c48531f1
extract source creation to its own method
2017-02-11 15:57:52 +11:00
Tim Sebastian
a766b66b91
extract loadercontext creation to its own method
2017-02-11 15:32:48 +11:00
Tim Sebastian
e028b89abe
rename setError to "markModuleAsErrored" and move it to prototype
...
- also remove unused param
- call callback outside of method call
2017-02-11 14:41:26 +11:00
Tim Sebastian
c948f18e47
fixme
2017-02-11 14:23:51 +11:00
Tim Sebastian
c9038accc0
split up "updateHash" into subtask methods
2017-02-11 14:17:54 +11:00
Tim Sebastian
f16867d7f6
migrate NormalModule to es6
2017-02-11 14:16:18 +11:00
Tobias Koppers
bfccb20920
fix PR
2017-01-16 03:21:13 +01:00
Sean Larkin
5a3a23f3e3
fix(nmf): Fix exports for var injection to include free glob exports or arguments
2017-01-15 12:02:43 -06:00
Tobias Koppers
8e69a80847
code linting
2017-01-11 12:29:01 +01:00
Sean Larkin
e128cdd64b
ci(yarn): fix an issue where CI is failling to link ( #3654 )
2016-12-30 14:55:11 -06:00
Tobias Koppers
dcb1d4599c
removed unused stuff in NormalModule
...
It was used for the DedupePlugin
2016-12-30 13:57:48 +01:00
Tobias Koppers
862478e3b4
reset meta on recompile
2016-12-21 13:22:14 +01:00
Tobias Koppers
ea3b2303a8
fixes an error where errors are not cleared in cached module
2016-12-16 19:12:47 +01:00
Tushar Sonawane
6b39a5325c
fix 'no-inner-declarations' warnings
2016-10-29 19:30:01 +05:30
Tobias Koppers
a53799c0ac
use new RuleSet matching instead of LoadersList
...
pass issuer via contextInfo
2016-09-15 00:22:10 +02:00
Tobias Koppers
1ee3585fa1
compilation error don't affect parent module
...
recover after syntax error
assume es6 module on syntax error
#2117
2016-07-03 13:13:01 +02:00
Tobias Koppers
cf00a1a22d
rewrite cases where js beautify and eslint disagree on formatting
2016-06-20 21:46:27 +02:00
Simen Bekkhus
b1bdd6989f
Use eslint's indent rule
2016-06-20 08:21:00 +02:00
e-cloud
13322ca35c
add missing constructors for all classes needed
...
As i walk through the source, i've tried to trace the webpack running stack.
Then, i find the missing constructors result in uncleasr stack and create a patch
for them.
2016-05-20 13:39:36 +08:00
Tobias Koppers
d483ed2878
fixed a edge case with var injection
2016-03-10 10:50:29 +01:00
Tobias Koppers
ca0702b993
free var injection should go before export and import
2016-02-22 17:13:28 +01:00
Tobias Koppers
4a52440ea8
track dependencies even if error occur
...
fixes #1975
merged #1985
2016-02-03 23:46:51 +01:00
Tobias Koppers
a803902ed8
fixed #1883
2016-01-30 12:50:42 +01:00
Tobias Koppers
9a901a9f1c
fixed a bug with watching
2016-01-21 01:11:32 +01:00
Tobias Koppers
fecf07dd1f
integrated new enhanced-resolve version
2016-01-03 21:42:56 +01:00
Tobias Koppers
ded70aef28
moves stuff from webpack-core to webpack-sources
2015-12-29 17:44:55 +01:00
Tobias Koppers
4985cb2844
Merge branch 'master' into webpack-2
...
Conflicts:
lib/dependencies/ContextDependency.js
2015-10-18 10:55:23 +02:00
Tobias Koppers
5acfacfdd6
replaced Class with constructor
2015-10-18 10:53:38 +02:00
Tobias Koppers
5bbfbae551
Merge branch 'master' into webpack-2
...
Conflicts:
package.json
test/statsCases/chunks/expected.txt
2015-07-25 13:49:14 +02:00
Tobias Koppers
8d5c2c8c30
Merge pull request #732 from Arnavion/master
...
Expose the compiler's input filesystem to loaders.
2015-07-23 23:31:55 +02:00
Tobias Koppers
431a4c791c
Merge branch 'master' into webpack-2
...
Conflicts:
hot/dev-server.js
hot/only-dev-server.js
hot/poll.js
hot/signal.js
lib/ChunkTemplate.js
lib/HotModuleReplacement.runtime.js
lib/HotModuleReplacementPlugin.js
lib/JsonpMainTemplatePlugin.js
lib/MainTemplate.js
lib/NormalModule.js
lib/Parser.js
lib/RecordIdsPlugin.js
lib/WebpackOptionsApply.js
lib/dependencies/RequireEnsureDependency.js
lib/node/OldNodeWatchFileSystem.js
lib/optimize/OccurrenceOrderPlugin.js
package.json
2015-07-17 09:30:37 +02: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
8cfeb51c30
refactoring and bug fixes
2015-07-07 00:11:13 +02:00
Tobias Koppers
28aa3624a4
Merge pull request #1060 from webpack/multi-build
...
Multiple build support
2015-05-30 02:37:25 +02:00
Kenny Tran
08d9d87f9a
Fix typos
2015-05-26 19:59:02 -07:00
Tobias Koppers
817e678d9a
added DllPlugin and dll example
2015-05-16 18:27:59 +02:00
Tobias Koppers
cebd3b9722
added linting
2015-04-23 23:55:50 +02:00
Tobias Koppers
219b2b7995
fixed webpack/bundle-loader#14
2015-04-10 00:16:21 +02:00
Tobias Koppers
44cfedd24e
Store `recordsPath` paths relative to `options.context`
...
deduplicated modules can be stored in records
fixes #295
2015-04-04 02:09:49 +02:00
Tobias Koppers
8fef0c79f3
cache sources
2015-04-03 19:47:53 +02:00
Arnavion
0d93cbfe04
Expose the compiler's input filesystem to loaders.
2015-01-27 21:55:07 -08:00
Tobias Koppers
6037f76dc0
fixed typo
2015-01-13 13:03:06 +01:00
Tobias Koppers
d863bb287e
include meta info in hash
2014-11-06 00:21:32 +01:00
Tobias Koppers
27295ac14d
expose sourceMaps flag to loaders
2014-08-27 17:00:26 +02:00
Tobias Koppers
d80cdcefac
Code Quality
2014-06-24 18:53:32 +02:00
Tobias Koppers
3eefb91a5b
cache the generated source
...
This caches the SourceMap for the eval-source-map devtool
fixes #271
2014-05-17 00:31:52 +02:00
Tobias Koppers
b2638d21bf
Revert "cache the replaced source for performance"
...
This cannot be cached because module ids may change.
This reverts commit 8a7b508165
.
fixes webpack/grunt-webpack#19
2014-03-07 17:07:58 +01:00
Tobias Koppers
0fea43b4cb
rename generated require to __webpack_require__
...
fixes #141
fixes RubenVerborgh/N3.js#18
2014-03-03 14:56:17 +01:00
Tobias Koppers
8a7b508165
cache the replaced source for performance
2014-02-13 11:41:10 +01:00
Tobias Koppers
6086d8cd55
insert free var injection code to correct place
...
webpack/webpack#167
2014-02-12 14:53:33 +01:00
Tobias Koppers
91b7921e73
allow module.noParse to be a string
2014-02-04 12:21:01 +01:00
Tobias Koppers
e246c5badc
added optimize-tree hook, reset module on build
2014-01-29 10:13:28 +01:00
Tobias Koppers
f67fd530eb
started local modules #153
...
bug fixes
2014-01-23 18:35:56 +01:00
Tobias Koppers
30f954067c
track chunk origin
2014-01-23 15:31:40 +01:00
Tobias Koppers
776eabc6f1
expose the module to loaders
2013-12-19 22:32:13 +01:00
Tobias Koppers
52b40b3798
allow loaders to load modules
...
fixed templates readable name
2013-10-28 16:21:29 +01:00
Tobias Koppers
074a26efb5
Performance #106
2013-10-14 13:59:44 +02:00
Tobias Koppers
bedd59390c
edge case where injecting into require.e functions #102
2013-10-01 10:11:25 +02:00
jhnns
2dd0ba9552
fixed wrong `this` within modules fixes #97
2013-10-01 02:31:45 +02:00
Tobias Koppers
58586f8ae2
make it webpack-able
2013-07-10 23:20:07 +02:00
Tobias Koppers
b1fe88b531
fixed WebWorker with Hot Module Replacement #26
2013-06-20 12:04:31 +02:00
Tobias Koppers
c30f16f439
added experimental deduplication support #47
2013-06-12 16:16:06 +02:00
Tobias Koppers
72f29bf81c
move minimize option to plugin
2013-05-12 22:44:10 +02:00
Tobias Koppers
e43ec6251e
fixed edge cases
2013-04-02 09:14:19 +02:00
Tobias Koppers
0de7c73ad8
SourceMap support
2013-03-26 16:54:41 +01:00
Tobias Koppers
8e517c5c21
fixed minimize bug
2013-03-13 11:37:28 +01:00
Tobias Koppers
38d3c877dd
support labeled modules fixes #72
2013-02-26 12:36:34 +01:00
Tobias Koppers
1ce5f465b5
refactored addParsedVariable into ModuleParserHelpers
2013-02-05 08:31:46 +01:00
Tobias Koppers
e8f0e1d7cf
fix watching
2013-02-01 08:03:38 +01:00
Tobias Koppers
ee01837d66
Refactored everything for 0.9
2013-01-30 18:49:25 +01:00