Commit Graph

1429 Commits

Author SHA1 Message Date
ahabhgk ffda9bf704 fix lint 2024-04-13 02:54:43 +08:00
ahabhgk 0734314753 fix: mangle with destructuring 2024-04-13 02:40:28 +08:00
alexander.akait 7ec9157d78 test: added 2024-04-12 15:08:08 +03:00
David Michon 2feccc099d (fix) Correct behavior of __webpack_exports_info__.a.b.canMangle 2024-03-25 15:01:41 -07:00
alexander.akait be1d35eb02 fix(types): more 2024-03-18 18:50:56 +03:00
alexander.akait 3e3dfd781b fix(types): more 2024-03-17 20:15:44 +03:00
alexander.akait 9ed9d06c05 test: more 2024-03-15 19:59:30 +03:00
alexander.akait c80a7f2e16 refactor: code use attributes instead assertions 2024-03-15 18:11:02 +03:00
alexander.akait d6e98945c9 fix(js): import assertions 2024-03-15 17:24:33 +03:00
Alexander Akait 8a1adbc7d8
refactor: cleanup unnecessary return 2024-03-14 21:38:50 +03:00
alexander.akait 33cd20a180 fix(types): watching and more 2024-03-14 18:15:13 +03:00
alexander.akait d1353e1318 style: fix 2024-02-29 10:15:14 +03:00
alexander.akait cf62464926 style: fix 2024-02-28 18:23:23 +03:00
alexander.akait 1b1c8a4a6a fix: deserializer for ignored modules 2024-02-28 18:08:34 +03:00
Alexander Akait 5c2abc3734
feat(css): support css local ident name 2024-02-27 15:19:26 +03:00
alexander.akait caea8131b3 fix: types 2024-02-22 17:36:36 +03:00
alexander.akait 6ab9bdaa73 fix: types 2024-02-22 17:20:17 +03:00
ahabhgk d4dc533fc3 feat: support css local ident name 2024-02-22 20:10:45 +08:00
Alexander Akait c8d4b5e29c
fix: more types 2024-02-19 15:27:07 +03:00
ahabhgk fc7b34d8f0 fix: should not mangle when destructuring a reexport 2024-02-18 17:10:32 +08:00
bohan 513a6f9157 cleanup unnecessary return 2024-02-18 14:00:45 +08:00
alexander.akait 9f63f7013a refactor: more types 2024-02-16 20:39:12 +03:00
alexander.akait f06427a1a5 fix: make dynamic import optional in try/catch 2024-02-14 16:35:12 +03:00
ahabhgk 69127aed6e add test 2024-02-06 17:49:47 +08:00
ahabhgk 213290ea65 fix: not mangle export with destructuring 2024-02-06 17:47:11 +08:00
ahabhgk 052e1c9502 fix: __webpack_exports_info.xxx.canMangle should not always same as default 2024-02-06 16:19:56 +08:00
alexander.akait ca2fe13c8a chore(types): more 2024-01-26 20:38:18 +03:00
alexander.akait 3295f6c36f chore(types): more 2024-01-26 19:17:45 +03:00
alexander.akait 1c4bcfa36c chore(types): more 2024-01-26 17:53:40 +03:00
Alexander Akait f857674e6b
fix: worklet detection in production mode 2024-01-23 19:21:55 +03:00
alexander.akait 413eb126dc fix: worklet detection in production mode 2024-01-23 17:42:10 +03:00
ahabhgk de0e5987d4 fix: error for cyclic importModule 2024-01-23 17:32:50 +08:00
ahabhgk b19c422925 fix: add warning for async external 2024-01-16 10:25:30 +08:00
Alexander Akait 0781eac69c
feat: add warning for async module when not supported 2024-01-15 17:21:20 +03:00
ahabhgk a55f34349a feat: add warning for asyncModule 2024-01-14 18:11:12 +08:00
Nitin Kumar 412ae5425e chore: udpate prettier to v3 2024-01-14 07:11:34 +05:30
Alexander Yamakin ce6b0618ff
Merge branch 'main' into feature-14072 2024-01-09 02:59:32 +03:00
Alexander Akait c1b45d5d80
fix: runtime logic 2024-01-04 15:47:05 +03:00
Alexander Akait 4d9152bed7
fix: destructing assignment of dynamic import json file 2023-12-29 19:50:46 +03:00
Alexander Akait e311aedfbb
fix: typo in an error message for the top-level-await experiment 2023-12-28 17:54:19 +03:00
Ben Worline b14922c5be Refactor shared code 2023-10-02 10:28:43 -07:00
Ben Worline d4e8485462 initial 2023-09-30 22:13:01 -07:00
Marcin Ciarka f2bc0db07f
fix typo 2023-08-24 13:55:23 +03:00
Burhanuddin Udaipurwala a9cbd06ab4 fix: unusued identifiers should retain names 2023-07-02 11:03:03 +05:30
ahabhgk 182f913f9b fix: destructing assignment of dynamic import json file 2023-06-23 15:19:15 +08:00
alexander.akait cff406cc54 refactor(types): more 2023-06-21 19:01:55 +03:00
alexander.akait 3f71468514 refactor(types): more 2023-06-21 19:01:55 +03:00
alexander.akait d9d64b5198 refactor(types): more 2023-06-21 19:01:53 +03:00
alexander.akait e226101c55 refactor(types): more 2023-06-21 19:00:24 +03:00
alexander.akait a911bd9fa1 refactor(types): more 2023-06-21 19:00:24 +03:00
alexander.akait e381884115 refactor(types): more 2023-06-21 19:00:24 +03:00
alexander.akait 4809421990 refactor(types): more 2023-06-21 19:00:24 +03:00
alexander.akait 75151416ca fix: indirect call to tagged template expression 2023-06-17 22:54:17 +03:00
alexander.akait 9894226149 refactor(types): more 2023-06-14 19:46:53 +03:00
alexander.akait 83090d2189 refactor: avoid boolean 2023-06-12 21:56:08 +03:00
alexander.akait 591d3f4bd4 refactor: fix types 2023-06-12 21:56:08 +03:00
alexander.akait 5be6af542d fix: `false` value 2023-06-12 21:55:53 +03:00
alexander.akait a8e798150b fix: import.meta.webpackContext 2023-06-12 21:55:53 +03:00
alexander.akait fcbbacf730 refactor: logic 2023-06-12 21:55:52 +03:00
Andrew Boktor f68ab55320 Adding option to set fetchPriority on script tags 2023-06-12 21:55:52 +03:00
Sean Larkin d5397d83b5
Merge pull request #17301 from webpack/refactor-handle-json-errors
refactor: errors and lazy loading
2023-06-05 09:23:00 -07:00
Ben Worline c8dc5fac9b Handle barrel imports (#17305) 2023-06-02 15:16:53 -07:00
alexander.akait e0c7b6c48f refactor: errors and lazy loading 2023-06-01 22:55:49 +03:00
Alexander Akait 53c98f06ee
Merge pull request #17203 from bworline/ns
Normalize property accessors for es6 namespaces and chained member/call expressions
2023-05-31 21:39:09 +03:00
Alexander Akait 2a669ff061
Merge pull request #17212 from webpack/feat-support-custom-syntax
feat: introduce a new syntax for worklets - `*context.audioWorklet.addModule()`
2023-05-31 21:26:59 +03:00
Ben Worline 77c4deb47e Merge branch 'main' of https://github.com/webpack/webpack into ns 2023-05-31 10:15:14 -07:00
Ben Worline 5ab7e50503 handle null dep.idRangeStarts 2023-05-31 08:14:40 -07:00
Ben Worline 9bb13a8be6 incorporate CR feedback 2023-05-30 23:06:15 -07:00
Ben Worline b834303d83 add more error handling and json import support 2023-05-26 12:04:57 -07:00
Burhanuddin Udaipurwala 8bf6d59f35 refactor: refactor usages of module.loaded 2023-05-26 21:12:29 +05:30
Burhanuddin Udaipurwala 30f4da8f2d refactor: refactor usage of module.id 2023-05-26 21:11:32 +05:30
Burhanuddin Udaipurwala 839e2bf6ad refactor: use global runtime constants for webpack exports 2023-05-26 21:04:26 +05:30
Ben Worline f3fcd696d4 Merge branch 'main' of https://github.com/webpack/webpack into ns 2023-05-24 08:39:45 -07:00
Sean Larkin 4a8035f2b5
Merge pull request #17228 from burhanuday/refactor/burhan-use-globals
refactor: use global constant for __webpack_require__ instead of string literal
2023-05-24 07:16:33 -07:00
Ben Worline af6626981e fix use of "at" 2023-05-24 06:12:10 -07:00
Ben Worline 5b88a4865e yarn type-lint 2023-05-23 22:24:20 -07:00
Ben Worline a8bb2d73f8 Merge branch 'main' of https://github.com/webpack/webpack into ns 2023-05-23 20:22:06 -07:00
Ben Worline 7bdd6436ba move comment 2023-05-23 20:03:49 -07:00
Ben Worline afde59f5e9 add and handle another test case 2023-05-23 20:01:44 -07:00
Ben Worline f041e8dc56 remove extra memberRangeStarts changes 2023-05-23 15:36:56 -07:00
Ben Worline 6f43ce3bfb checkpoint 2023-05-23 15:29:25 -07:00
alexander.akait f003f1c138 refactor: types more 2023-05-22 05:12:44 +03:00
alexander.akait e719e60340 refactor: types more 2023-05-22 03:03:05 +03:00
alexander.akait 0401bd4a2c refactor: types more 2023-05-22 01:58:24 +03:00
alexander.akait 78075cac67 refactor: types more 2023-05-22 01:28:57 +03:00
alexander.akait d58b0c9c26 refactor: types more 2023-05-22 00:47:28 +03:00
alexander.akait 13f7bed151 refactor: types 2023-05-22 00:17:19 +03:00
alexander.akait 7cba20d462 refactor: types fix 2023-05-22 00:06:31 +03:00
alexander.akait 824333a2cb refactor(types): more 2023-05-21 23:35:47 +03:00
alexander.akait 055737dc0c refactor(types): more 2023-05-21 23:31:30 +03:00
Ben Worline 6a9f79b047 Merge branch 'main' of https://github.com/webpack/webpack into ns 2023-05-20 21:09:41 -07:00
Burhanuddin Udaipurwala 8d8a0e0e56 refactor: use global constant instead of string literal 2023-05-19 21:25:47 +05:30
alexander.akait b8e0bcf8b4 fix: regression 2023-05-17 21:47:54 +03:00
alexander.akait d2299c21eb refactor: rename symbol 2023-05-17 20:04:04 +03:00
alexander.akait 20c690025d feat: introduce a new syntax for worklets - `*context.audioWorklet.addModule()` 2023-05-17 19:59:51 +03:00
Ben Worline 457b2a82ac remove extra code from hack 2023-05-16 16:49:40 -07:00
Ben Worline 44d165309e hack to get test to pass; must be deleted 2023-05-16 16:33:15 -07:00
Ben Worline 19b46355fc fix import ordering 2023-05-04 21:36:03 -07:00
Ben Worline 2b2fed5880 Initial take 2023-05-04 20:41:15 -07:00
Sean Larkin f3389577ef refactor(types): Increase type coverage & docs for B.E.E 2023-04-28 19:21:02 +00:00
alexander.akait c3e393e7d7 refactor: code 2023-04-26 01:22:09 +03:00
alexander.akait bbfa58828e fix: tests 2023-04-25 19:43:45 +03:00
alexander.akait 4b287e1bad fix: types 2023-04-25 19:37:59 +03:00
alexander.akait b7997e4271 fix: cache 2023-04-25 19:34:44 +03:00
alexander.akait 56c6d8c517 fix: getResourceIdentifier 2023-04-25 19:34:44 +03:00
alexander.akait 1251e7cc55 fix: parser 2023-04-25 19:34:44 +03:00
Sean Larkin c20faeb785 fix lint and remove space from JSDoc type 2023-04-23 22:44:45 +00:00
Sean Larkin 4a1b8cefb9 refactor(types): add initial types to CommonJsExportsParserPlugin 2023-04-23 05:35:52 +00:00
alexander.akait 4f6dc32d38 chore: improve types 2023-04-21 19:22:33 +03:00
Sean Larkin 457cbe1599
Merge pull request #16903 from janlent1/fixruntimeissue
Fix runtime generation bug
2023-04-18 19:19:37 -07:00
Sean Larkin 7b42d98ef4
Merge pull request #16995 from webpack/feat/destructuring-assignment-await
support destructuring assignment with AwaitExpression
2023-04-15 15:12:33 -07:00
Sean Larkin ee2fe97dbc
Merge pull request #16996 from webpack/feat/destructuring-for-plugins
support destructuring assignment in import.meta
2023-04-15 12:50:44 -07:00
Ivan Kopeykin ef33009c52 fix warning message 2023-04-15 19:48:57 +03:00
janlent1 fe680fd00c
Merge branch 'main' into fixruntimeissue 2023-04-14 22:22:55 +02:00
alexander.akait aeafcf6a44 fix: logic 2023-04-14 01:52:50 +03:00
Ivan Kopeykin 730dab915b support destructuring assignment in import.meta 2023-04-13 18:47:52 +03:00
Ivan Kopeykin 3824beedaf support destructuring assignment with AwaitExpression 2023-04-13 17:16:32 +03:00
Ivan Kopeykin 8c8a3a0a99 fix caching 2023-04-09 11:33:49 +03:00
Ivan Kopeykin 45754f45d0 rename some properties, add more test cases 2023-04-09 10:44:09 +03:00
Ivan Kopeykin 397ce0c84e add import tree shaking support 2023-04-09 00:23:15 +03:00
alexander.akait 2145fde855 fix: detect `createRequire` when imported with `node:` prefix 2023-04-04 02:42:29 +03:00
Jan Lentmaier ccb2baaa78 Fix runtime generation bug
Removes runtime, which can be erroneous.
Instead, it doesn't use a runtime which at
this point in time is not final.
2023-04-03 18:31:02 +00:00
Sean Larkin fa4cbf11a1 add more module type constants, use them across codebase 2023-03-31 10:56:32 -07:00
Thomas Tay 47e14407c1 read/write options as a whole (follow ConsumeSharedModule) 2023-02-09 18:48:44 -08:00
Thomas Tay 0d91c55f76 Fix CI build failures due to extranous double quotes and await worker termination in config Cases
Can you believe it was only due to an extra "" in the code? smh...
2023-02-09 14:51:42 -08:00
xiaoxiaojx 3902ac5ffc fix: fix pureDep returns null in some js files 2023-02-09 14:16:25 +08:00
Thomas Tay ee2c87bcc2 lint 2023-01-26 14:44:01 -08:00
Thomas Tay 674dd74d04 serialize and update hash per options 2023-01-26 10:47:01 -08:00
Thomas Tay 0df564bc98 Make workerPublicPath optional and update docs 2023-01-25 12:17:15 -08:00
Thomas Tay c188270d13
Merge branch 'webpack:main' into main 2023-01-25 12:06:59 -08:00
Jack Works c922ee1569 chore: revert breaking change 2022-11-22 12:03:27 +08:00
Jack Works 4e643be0d7 fix: remove extra change 2022-11-22 11:42:29 +08:00
Jack Works 18c59c600d fix: avoid cross-realm objects 2022-11-22 11:37:16 +08:00
Tobias Koppers c18203c894 update tooling 2022-11-09 12:31:59 +01:00
Thomas Tay 895df2a5a1 Worker public path changes 2022-10-21 16:30:43 -07:00
Ivan Kopeykin c04bc487ff fix tap naming 2022-08-02 14:00:38 +03:00
Tobias Koppers 7b63346518
Merge pull request #15627 from webpack/feat/issue-12441
add tree-shaking to ProvidedDependency
2022-07-25 09:28:22 +02:00
Tobias Koppers 096efc3821
Merge pull request #15801 from webpack/refactor-json-modules
refactor json modules
2022-06-02 13:15:35 +02:00
Ivan Kopeykin aa76e823b0 fix discussions 2022-05-13 16:32:24 +03:00
Ivan Kopeykin c82dc1eee4 Merge branch 'main' into support-create-require
# Conflicts:
#	declarations/WebpackOptions.d.ts
#	lib/config/defaults.js
#	schemas/WebpackOptions.check.js
#	schemas/WebpackOptions.json
#	test/Defaults.unittest.js
#	test/__snapshots__/Cli.basictest.js.snap
#	types.d.ts
2022-05-10 13:48:43 +03:00
Tobias Koppers e2df0ddd92
Merge pull request #15494 from webpack/feature/global-options-for-dynamic-import
add parser options for dynamic import
2022-05-10 12:44:52 +02:00
Ivan Kopeykin 575a5da70d refactor json modules 2022-05-09 14:00:18 +03:00
IronLu233 2d661fa396 Fix `return"field"in Module` evaluated as `returntrue` #15759 2022-05-05 09:11:28 +08:00
Tobias Koppers 293e677b35
Merge pull request #15660 from webpack/add-provided-info-tests
fix HarmonyEvaluatedImportSpecifierDependency
2022-04-19 15:06:33 +02:00
Ivan Kopeykin 0d408d1c7f fix modules concatenation with importModule usage 2022-04-19 14:34:00 +03:00
Ivan Kopeykin 7033f55262 fix exports type usage 2022-04-14 15:53:24 +03:00
Ivan Kopeykin 55bebac16a fix HarmonyEvaluatedImportSpecifierDependency 2022-04-13 12:55:09 +03:00
Ivan Kopeykin cb53764327 fix discussions 2022-04-11 14:18:55 +03:00
Ivan Kopeykin 0ee3a992e8 fixes 2022-04-05 13:08:20 +03:00
Ivan Kopeykin d6d6fb584d Merge branch 'main' into feature-14072
# Conflicts:
#	lib/DependencyTemplate.js
#	lib/javascript/JavascriptGenerator.js
#	schemas/WebpackOptions.check.js
#	types.d.ts
2022-04-05 09:34:50 +03:00
Ivan Kopeykin 0aabe2a884 add tree-shaking to ProvidedDependency 2022-04-04 18:01:34 +03:00
Ivan Kopeykin 8df5134ddb support context 2022-03-31 15:10:21 +03:00
Ivan Kopeykin 3b6328c07a Merge branch 'main' into support-create-require 2022-03-28 17:29:13 +03:00
Ivan Kopeykin ee911c6aae add createRequire javascript parser option 2022-03-28 17:16:31 +03:00
Ivan Kopeykin 5605e5329a add test case 2022-03-28 08:03:20 +03:00
Ivan Kopeykin cf5fc90082 support context in Dependency 2022-03-25 17:01:48 +03:00
Ivan Kopeykin 34c4edca6b add createRequire support 2022-03-25 10:50:13 +03:00
Tobias Koppers 86a8bd9618
Merge pull request #15455 from webpack/feature/support-in-operator
add "in" operator support
2022-03-17 11:17:39 +01:00
Tobias Koppers 5cc3a39109
Merge pull request #15327 from webpack/fix/dont-count-optional-chaining-in-import-specifier
dont count optional chaining in import specifier
2022-03-15 16:56:06 +01:00
Tobias Koppers ee6b53d821 do not error when using lazy-once 2022-03-15 16:34:05 +01:00
Tobias Koppers e184a03f25
Merge pull request #15524 from CommanderRoot/rm-deprecated-substr
fix: Replace deprecated String.prototype.substr()
2022-03-15 15:54:56 +01:00
Ivan Kopeykin 5a9ead926a fix discussion 2022-03-15 16:47:07 +03:00
Ivan Kopeykin b2fc854227 fix parser.evaluteExpression api 2022-03-15 15:37:17 +03: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 62d50bad4b add parser options for dynamic import
- add dynamicImportMode for ContextModule
- add dynamicImportPrefetch for prefetch order
- add dynamicImportPreload for preload order
2022-03-09 10:27:02 +03:00
Ivan Kopeykin cb05e419bc handle possible side effect 2022-03-08 14:06:02 +03:00
Tobias Koppers b095e8d138 remove arguments, replace whole expression 2022-03-08 08:02:54 +01:00
Ivan Kopeykin 4fe01b2954 fix asiSafe 2022-03-07 17:57:38 +03:00
Ivan Kopeykin f9779f1d0c improve dependency 2022-03-04 11:39:51 +03:00
Tobias Koppers b53fe2f630
Merge pull request #15446 from webpack/feature/import-meta-webpack-context
import.meta.webpackContext
2022-03-03 09:07:11 +01:00
Ivan Kopeykin eb5d124150 add "in" operator support 2022-03-02 15:01:35 +03:00
Ivan Kopeykin d3c5d357cc add ImportMetaContextPlugin 2022-03-01 18:11:31 +03:00
Ivan Kopeykin b89f397e3c handle more options 2022-03-01 17:16:49 +03:00
Ivan Kopeykin 005e065fc4 renaming 2022-02-28 22:52:16 +03:00
Tobias Koppers 1f0266b266
Merge pull request #15435 from webpack/fix/issue-14974
fix HarmonyAcceptImportDependency
2022-02-28 08:41:02 +01:00
Ivan Kopeykin 2764e91b76 import.meta.webpackContext 2022-02-26 23:26:45 +03:00
Ivan Kopeykin 8e6f006f20 fix imports order 2022-02-24 18:27:56 +03:00
Ivan Kopeykin ac1a5139a8 fix HarmonyAcceptImportDependency 2022-02-23 14:58:25 +03:00
Ivan Kopeykin 2665fb118c add baseUri entry option 2022-02-21 16:23:47 +03:00
Ivan Kopeykin a905ea376e fix discussions 2022-02-11 11:07:54 +03:00
Ivan Kopeykin 48305033f4 fix ExportsInfo
- should mark every export canMangleProvide=false if there are unknown exports
- add __webpack_exports_info__.<name>.canMangle to api
- add test case
2022-02-10 16:20:53 +03:00
Ivan Kopeykin 403057c76c fix serialization in ContextElementDependency 2022-02-09 15:32:10 +03:00
Ivan Kopeykin 59437ccd10 dont count optional chaining in import specifier
instead of full member expression use only non-optional member expression part
2022-02-07 16:14:22 +03:00
Tobias Koppers 46e8639a6a
Merge pull request #15246 from pavelsavara/import_meta_url
Disable compile time evaluation of import.meta.url
2022-01-28 15:38:19 +01:00
Ivan Kopeykin 232403c5e8 fix discussions 2022-01-28 12:00:53 +03:00
Ivan Kopeykin 17e8eed735 add test case 2022-01-28 08:59:28 +03:00
Ivan Kopeykin c09e82fcfe add importMeta to JavascriptParserOptions:
- enable/disable import.meta parsing
- when disabled insert output.importMetaName
2022-01-27 22:54:47 +03:00
Tobias Koppers 804f49c32c fix handling of errors thrown in async modules 2022-01-27 16:28:28 +01:00
pavelsavara 332fb11067 fix 2022-01-26 10:48:01 +01:00
pavelsavara 73bb43139d - add new config section importMeta
- use it in ImportMetaPlugin to switch it off as necessary
2022-01-25 16:08:56 +01:00
Tobias Koppers 508877c91d
Merge pull request #15050 from luffy84217/fix-callback-err-type-should-include-null
fix callback err type should include null
2022-01-17 17:52:42 +01:00
evilebottnawi 01ce7411ad fix: cache for CreateScriptUrlDependency 2022-01-12 17:42:22 +03:00
Asriel Yu 136b723023 fix callback err type should include null 2021-12-24 20:27:31 +08:00
Tobias Koppers 54fff4dd0a add support for `@keyframes`, `animation`, CSS Variables 2021-12-16 20:42:44 +01:00
Tobias Koppers bdd5d3d9d3 add uniqueName for css module classes 2021-12-15 16:46:13 +01:00
Tobias Koppers 5676030623 improve css exports transfer format for the common case 2021-12-15 15:27:11 +01:00
Tobias Koppers bdf4d83aca add basic css modules support 2021-12-15 15:27:11 +01:00
Tobias Koppers 453e5cac05 add support for :export {} block 2021-12-14 16:21:32 +01:00
Tobias Koppers b9c6691ff5 bugfixes, external assets 2021-12-03 16:23:09 +01:00
Tobias Koppers e67ab7fad2 resolve todos, nitpicks 2021-12-03 08:47:17 +01:00