alexander.akait
5c8bccaf28
feat: allow to override module in factory
2023-04-25 19:34:44 +03:00
Sean Larkin
06d5e562c5
Merge pull request #15198 from stefanprobst/fix/pass-package-type-to-loader-runner
...
fix: pass package type to loader runner
2023-04-18 18:42:59 -07:00
alexander.akait
65d17428da
fix: bug
2023-04-18 15:02:05 +03:00
Sean Larkin
765cbff1dc
Merge pull request #16477 from xiaoxiaojx/fix/issue-16466
...
fix: oneOf rule has been picked multiple times
2023-04-05 10:58:26 -07:00
Sean Larkin
fa4cbf11a1
add more module type constants, use them across codebase
2023-03-31 10:56:32 -07:00
Sean Larkin
a3ab4e78b6
Merge pull request #16807 from snitin315/improve-resolve-extention-error
...
fix: improve error message if `resolve.extensions` is invalid
2023-03-27 08:13:32 -07:00
Nitin Kumar
d9604e9003
refactor: move RegExp to a variable and use RegExp.prototype.test()
2023-03-27 12:20:30 +05:30
Sean Larkin
7e5fba30c9
Merge pull request #16806 from snitin315/fix-typo-in-error
...
fix: improve `resolveResourceErrorHints` error message
2023-03-21 08:28:19 -07:00
stefanprobst
e00d817c02
Update lib/NormalModuleFactory.js
2023-03-20 11:35:07 +01:00
Stefan Probst
a8d7412104
fix: pass type to loader for .mjs / .cjs
2023-03-20 08:22:14 +01:00
Stefan Probst
6c03c5a0eb
fix: don't use optional chaining
2023-03-20 08:19:12 +01:00
Stefan Probst
0145c43df8
fix: handle missing `descriptionFileData`
2023-03-20 08:19:12 +01:00
Stefan Probst
29bd40e979
fix: pass package type to loader runner
2023-03-20 08:19:10 +01:00
Nitin Kumar
482ec6d6c5
fix: improve resolve extention hint to be in one line
2023-03-12 16:18:01 +05:30
Nitin Kumar
68f2598bef
fix: improve error message if `resolve.extensions` is invalid
2023-03-11 11:00:12 +05:30
Nitin Kumar
b99aa598e0
fix: improve `resolveResourceErrorHints` error message
2023-03-11 10:20:50 +05:30
xiaoxiaojx
2719ecc91a
fix: oneOf rule has been picked multiple times
2022-11-15 15:17:11 +08:00
Tobias Speicher
8f56fcba72
Replace deprecated String.prototype.substr()
...
String.prototype.substr() is deprecated (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr ) so we replace it with slice() which works similarily but isn't deprecated.
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
2022-03-13 22:54:18 +01:00
Ivan Kopeykin
c09d86961d
add NormalModuleFactory hooks types
2022-02-15 18:25:44 +03:00
Ivan Kopeykin
93ad32423f
add parseResourceWithoutFragment to identifier.js
2022-02-03 18:46:54 +03:00
Ivan Kopeykin
312239a712
use real loader path
2022-01-30 19:36:24 +03:00
Tobias Koppers
67d6c7a31b
fix `.webpack[]` suffix to not execute rules
2021-10-08 13:56:39 +02:00
Tobias Koppers
931d14615f
move unsafe cache from NormalModuleFactory to Compilation to skip more processing
2021-09-28 11:37:29 +02:00
Tobias Koppers
765101bded
match resource should not include special `.webpack[...]` extension
...
`.webpack[]` should not be used for resource path
2021-09-03 16:17:41 +02:00
Tobias Koppers
9bf6797416
fix resolving context for redirects
2021-08-05 21:10:39 +02:00
Tobias Koppers
30ebedd4dd
fix handling of new URL() in remote resources
2021-08-05 17:37:37 +02:00
Tobias Koppers
b6609a4f6b
add `experiments.buildHttp`
...
allows to build remote resources
stores remote resources in a lockfile
2021-08-05 15:47:18 +02:00
Sven Sauleau
6c50c81350
Revert "Revert "Merge pull request #12278 from xtuc/sven/import-assertions""
...
This reverts commit 61946b7c46
.
2021-07-24 23:28:30 +01:00
Tobias Koppers
61946b7c46
Revert "Merge pull request #12278 from xtuc/sven/import-assertions"
...
This reverts commit df02bc6c0a
, reversing
changes made to a6f341e243
.
2021-07-16 21:54:21 +02:00
Tobias Koppers
7f22e4721f
match on asserts
...
change Map to Record
improve test case
2021-07-16 13:17:20 +02:00
Sven Sauleau
b166f46f2c
parse import assertions
2021-07-16 13:14:54 +02:00
Tobias Koppers
e6f098903f
fixes #13691
2021-07-05 11:22:13 +02:00
Tobias Koppers
b443555501
this is a workaround to remove compilation-specific references from modules in the unsafe cache
...
I'm not proud of this solution, but it fixes it for now
Long term we might move these kind of references out of the module
into some kind of compilation/module graph specific store.
But that's not yet possible for backward-compat reasons.
2021-07-01 11:46:59 +02:00
Tobias Koppers
973edfbd1b
support data urls as input in `new URL`
2021-05-19 11:30:09 +02:00
Tobias Koppers
eea0aee1a7
catch errors thrown during parser/generation creation
2021-04-30 09:45:14 +02:00
Tobias Koppers
21bc6e715b
add support for a pseudo `.webpack[type]` extension allows to set module type when no other type is set from module.rules
2021-04-12 12:27:54 +02:00
Tobias Koppers
09faac25ec
fix imports field
2021-03-19 09:13:47 +01:00
Tobias Koppers
18967078cb
cleanup modules after compilation to avoid leaking references when they are cached
2021-03-15 11:23:54 +01:00
Tobias Koppers
72455273db
allow to define "ignored modules" per dependency
...
new URL() will use `"data:"` when ignore
2021-03-11 18:37:20 +01:00
Tobias Koppers
d0fe577b27
add some better hints when resolving fails
2021-02-08 22:11:05 +01:00
Tobias Koppers
013ca3bdd7
add commonjsMagicComments options
...
move javascript related options from 'module' to 'module.parser.javascript'
2021-01-20 20:19:49 +01:00
Tobias Koppers
15467b434f
Merge pull request #12037 from PlayMa256/improve-dx
...
fix(normal-module-factory): improve dx on deprecation messages
2021-01-18 16:02:52 +01:00
Tobias Koppers
10aa3daede
add experiments.layers
...
add layers to define different module layers
support module layers in stats
add layer support for NormalModules
fixes #11466
2021-01-05 20:50:59 +01:00
Tobias Koppers
aac7f2e619
allow to configure parsers and generators globally
...
get plugin schemas from root schema
normalize module.parser/generator
add test case
2021-01-05 12:08:30 +01:00
Tobias Koppers
29c274eec3
use correct hook in deprecation message
2021-01-04 15:47:57 +01:00
Tobias Koppers
e936f16764
add space
2020-11-23 09:38:00 +01:00
PlayMa256
407528ba48
fix(normal-module-factory): improve dx on deprecation messages
2020-11-20 17:14:43 -03:00
Tobias Koppers
3d8f130ee3
add breaking change info for fullySpecified resolving
...
#11467
2020-09-15 15:12:15 +02:00
Tobias Koppers
39d2f8f7f3
fix URL nitpicks
2020-09-02 15:09:41 +02:00
Ivan Kopeykin
4157166263
Merge branch 'master' into feature/asset-url
...
# Conflicts:
# test/Defaults.unittest.js
2020-08-16 15:47:05 +03:00
Ivan Kopeykin
65bed95efe
pass dependencyType directly to ruleset
2020-08-06 21:34:47 +03:00
Ivan Kopeykin
fcac182805
match dependency with Rule
2020-08-06 02:08:06 +03:00
Ivan Kopeykin
ddc83b0d70
feat: url assets
2020-08-05 00:55:38 +03:00
Ivan Kopeykin
4fc44a3398
add more types
2020-08-02 23:47:54 +03:00
Tobias Koppers
205bbb4c0d
improve compatibly with node.js ESM
...
improve experiments.mjs to be more compatibly with node.js ESM
- add support for `type: "module"` in package.json
- add support for `*.cjs`
- enable strict ESM for data uris with `text/javascript` or `application/javascript`
- disallow not fully specified requests in imports `*.mjs` or `type: "module"`
add `descriptionData` rule condition to match package.json info
fix passing resolveOptions along context modules
2020-07-17 13:58:29 +02:00
Tobias Koppers
5f4c4662dd
rename parsePathQueryFragment to parseResource and add caching
2020-07-06 17:39:52 +02:00
Tobias Koppers
f6aadd01f1
remove unneeded scheme property in createData
2020-07-03 17:19:43 +02:00
Tobias Koppers
7442a211b9
add support for resource fragments
2020-07-03 17:03:15 +02:00
Tobias Koppers
7dad1c1c30
refactor scheme handling into plugins
2020-07-03 17:01:02 +02:00
Ivan Kopeykin
d42d2b51df
check for Windows absolute url in URLAbsoluteSpecifier util
2020-06-29 12:24:44 +03:00
Ivan Kopeykin
89abab2631
add absolute url specifier support
2020-06-26 22:16:27 +03:00
Tobias Koppers
b30b9681fa
opt-out from unsafe caching when providing shared module as side-effect
2020-06-24 23:06:36 +02:00
Tobias Koppers
ba9027ac1a
Merge pull request #10719 from goganchic/feature/data-uri
...
Implement Data URI imports
2020-06-24 11:08:44 +02:00
Ivan Kopeykin
8174145782
upgrade enhanced-resolve
2020-06-17 14:22:37 +03:00
Ivan Kopeykin
198e51a485
Merge branch 'master' into exports-field
...
# Conflicts:
# lib/dependencies/ImportDependency.js
# lib/sharing/ConsumeSharedPlugin.js
# lib/sharing/ProvideSharedPlugin.js
# types.d.ts
2020-06-16 21:16:41 +03:00
Ivan Kopeykin
3f8def8185
fix discussions
...
- add module condition
- rename EnhancedResolveOptions
- fix applyByDependency util function
- use EMPTY_RESOLVE_OPTIONS when resolveOptions are undefined
2020-06-16 21:02:31 +03:00
Tobias Koppers
1c42f71250
allow to provide and consume multiple versions of shared modules
2020-06-13 14:45:37 +02:00
Ivan Kopeykin
d2a08e3cc8
rework how byDependency applied
...
remove dependencyType parameter for resolver factory
add dependencyType option in enhanced resolve options
2020-06-09 01:32:24 +03:00
goganchic
819dd10a22
rename dataURIMimetype and remove redundant regex check
2020-06-05 16:08:06 +03:00
goganchic
4b59a302a2
add mimetype rule
2020-06-05 15:15:11 +03:00
goganchic
1cdd38d3c0
check for data-uri before resource resolving
2020-06-05 15:15:11 +03:00
goganchic
19609937c7
implement uri imports
2020-06-05 15:15:10 +03:00
Ivan Kopeykin
d4b1819749
add ability to set resolve options per dependency category
...
- byDependency option
- create resolver per dependency category
2020-05-28 02:30:29 +03:00
Ivan Kopeykin
b7098ae52b
define dependency category as string instead of enum
2020-05-27 22:57:45 +03:00
Ivan Kopeykin
8c1d64c5fd
rework how condition names pass to resolve option
2020-05-27 02:27:52 +03:00
Ivan Kopeykin
7f84f6be46
support import and require condition names
2020-05-26 00:48:41 +03:00
Emanuele Stoppa
e607681277
fix: replaced some TODO with correct types and fixed some runtime issue
2019-11-28 22:48:01 +01:00
Sergey Melyukov
491cb57cb4
initial improvement for asset modules
2019-11-26 15:41:48 +01:00
Tobias Koppers
1f3d2b680e
rename empty object constant
2019-11-19 13:14:58 +01:00
Tobias Koppers
e00b0a40d4
avoid has -> get, set -> get
2019-11-19 12:17:46 +01:00
Sergey Melyukov
53764f5d36
refactor: fix review comments
2019-11-18 20:01:54 +03:00
Sergey Melyukov
265ef68405
refactor: improve generator/parse cache in module factory
2019-11-18 18:12:12 +03:00
Tobias Koppers
c21fb4bd58
Add LazySet for file/context/missingDependencies for performance
2019-08-07 16:13:56 +02:00
Tobias Koppers
c94073b31c
update enhanced-resolve
2019-07-05 00:45:41 +02:00
Tobias Koppers
8bf8e857ad
Merge tag 'v4.35.1' into next
...
4.35.1
2019-07-01 11:15:52 +02:00
Tobias Koppers
fec4d536a3
only affect loader order when match resource is used
2019-07-01 09:37:35 +02:00
James Chapman
49dc747a63
fix loader ordering
2019-06-25 19:26:53 +01:00
Tobias Koppers
6db94536ad
Merge tag 'v4.34.0' into next
...
4.34.0
2019-06-13 10:51:12 +02:00
Tobias Koppers
e9c0d068dd
refactor filesystem interfaces
...
add Compiler.intermediateFileSystem
avoid using `path` and `fs` module when possible
move `join`, `mkdirp` and `dirname` into utils
join and dirname is optional in FileSystem interface
remove mkdirp from Filesystem interface
2019-06-11 17:32:58 +02:00
Tobias Koppers
fd4b3c503a
pretty files
2019-06-09 11:23:42 +02:00
Tobias Koppers
51b19ebd1f
make refs independent of number of default rules
2019-06-04 11:33:16 +02:00
Tobias Koppers
74d4669d73
rewrite RuleSet to RuleSetCompiler with plugins
...
remove some deprecated features (query, loaders)
add missing condition (realResource)
2019-05-16 11:37:52 +02:00
Tobias Koppers
f03c4f127a
improve merging of resolve and parsing options
...
by rules and via loader API
Objects are deeply merged
Arrays overwrite by default, but can reference old value with "..."
fixes #8968
2019-05-13 15:30:10 +02:00
Tobias Koppers
aa05168971
fixups
2019-05-10 11:06:25 +02:00
Tobias Koppers
90baf475af
Smaller performance improvements in NormalModuleFactory
2019-01-08 15:14:33 +01:00
Tobias Koppers
ef9e25d8ea
report dependencies from resolver to the compilation
...
refactor NormalModuleFactory
2019-01-08 15:14:25 +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
a21bc44345
ignored module no longer contain context path
2018-12-07 15:46:32 +01:00
Tobias Koppers
3b35fd478c
use module.unsafeCache only for node_modules
...
remove unsafe resolve cache remainings
2018-10-31 13:17:32 +01:00
Tobias Koppers
2e82dbb63c
Merge pull request #7813 from webpack/refactor/freeze_hooks
...
Freeze hooks to prevent deopts
2018-07-30 22:47:13 +02:00