Commit Graph

39 Commits

Author SHA1 Message Date
alexander.akait 4809421990 refactor(types): more 2023-06-21 19:00:24 +03:00
Sean Larkin fa4cbf11a1 add more module type constants, use them across codebase 2023-03-31 10:56:32 -07:00
Tobias Koppers 9130d10627 fix called variables with ProvidePlugin
fixes #11619
2020-10-10 02:52:43 +02:00
Tobias Koppers b9c50fdb09 fix jsdoc documentations 2020-04-28 19:42:58 +02:00
Tobias Koppers acff6ec992 move BasicEvaluatedExpression and JavascriptParserHelpers to javascript directory 2019-10-22 09:27:52 +02:00
Tobias Koppers 3cbdb703fc NullFactory is not required 2019-08-07 16:14:03 +02:00
Florent Cailhol 8a10ea3c92 Type 'apply' method of plugins 2018-11-12 14:26:31 +01:00
Tobias Koppers 6e64480e9d Partial revert of #8250 as this is no longer a limitation 2018-11-05 10:28:51 +01:00
Tobias Koppers 8cf1cdb74f Merge tag 'v4.25.0' into next
4.25.0
2018-11-05 10:27:45 +01:00
薛定谔的猫 7c8f0c9427
fix: disable ProvidePlugin (fixes #7032) 2018-10-31 19:45:34 +08:00
Florent Cailhol a19a0ebaa6 Refactor ProvidedDependency to avoid duplication 2018-07-30 22:38:28 +02:00
Florent Cailhol bc62f58c44 Convert ProvidePlugin 2018-07-30 22:37:48 +02:00
Tobias Koppers cf5f1d723c format existing code 2018-07-30 21:29:21 +02:00
Florent Cailhol 5bc6b8d50e Rename ParserHelpers into JavascriptParserHelpers 2018-07-03 14:08:43 +02:00
Florent Cailhol 6097c5f993 Destructure parser helpers 2018-07-03 14:08:43 +02: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
Florent Cailhol c8e60b4322 Update Parser helpers to be compatible with hooks 2017-12-15 17:08:49 +01:00
Florent Cailhol 08ddad2e10 Replace NormalModuleFactory#plugin() calls 2017-12-14 14:42:49 +01:00
Florent Cailhol 36c690d37f Use tapable instead of 'plugin' 2017-12-08 14:23:31 +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 f7c2f8e470 Update code style to arrow functions 2017-11-08 11:56:01 +01:00
SendilKumar N 3e22f61bf1 Refactor(ES6): ProgressPlugin 2017-02-22 15:57:56 +08:00
SendilKumar N a2c5d79b8a Refactor(ES6): ProvidePlugin 2017-02-22 15:47:14 +08:00
Tim Sebastian 5240430321 apply split methods to their usages 2017-01-21 13:51:35 +11:00
Tim Sebastian 58e7a2f30b add simple returnTrue helper, less function definitions 2017-01-21 13:51:35 +11:00
Tim Sebastian 965b7261fa move more ConstDependencies to `toConstantDependency` 2017-01-21 13:51:35 +11:00
timse 86c00207bd Extract to parser helpers (#3843)
* rename ModuleParserHelpers to ParserHelpers

- rename module and file from ModuleParserHelpers to ParserHelpers
- change imports and usages
- rename addParsedVariable to addParsedVariableToModule to add module context again

* introduce setTypeof helper to ParserHelpers

* switch setTypeof in amdplugin - use ParsersHelpers instead

* switch setTypeof in CommonJsPlugin - use ParsersHelpers instead

* switch setTypeof in SystemPlugin - use ParsersHelpers instead

* add ParserHelpers.expressionIsUnsupported method

* use ParserHelpers.expressionIsUnsupported in SystemPlugin and NodeStuffPlugin

* refactor setTypeOf to more atomic helper methods

- reduces sideeffects as parser is called outside of helper
- allows better reuse

* use ParserHelper on more pieces in CommonJsPlugin making BasicEvaluatedExpression obsolete

* switch new BasicEvaluatedExpression().setString(<somestring>).setRange(expr.range) in dependencies to ParserHelpers

* switch other new BasicEvaluatedExpression().setString(<somestring>).setRange(expr.range) to ParserHelpers

* rename wrongly named function - name anonymous functions
2017-01-08 12:11:26 -06:00
Garth Poitras 64f9a16bf6 fix(ProvidePlugin): support properties from modules. Closes #2864 (#3597) 2016-12-28 13:41:09 -06:00
Tim Sebastian 82dcf3d2e6 delete duplicate of line 35
the named identifier for the scopedName is already set in line 35.
Probably because line 35 was at some point lifted to where it is now.
2016-12-19 23:21:07 +11:00
Tobias Koppers ec262a4007 refactoring: moved parser instancation into NormalModuleFactory
breaking change: compiler.parser must no longer be used. Use this instead:

``` js
compiler.plugin("compilation", function(compilation, params) {
  params.normalModuleFactory.plugin("parser", function(parser, parserOptions) {
    parser.plugin(/* ... */);
  });
});
```

required for #2978
2016-09-15 00:22:10 +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
Avi Haiat daff7440a6 feat(app): Fix some obvious lint errors and warnings 2015-07-08 15:52:41 +03:00
Tobias Koppers cebd3b9722 added linting 2015-04-23 23:55:50 +02:00
Tobias Koppers 3d153efe27 better handling of nested vars in Define and Provide
fixes #812
2015-02-28 00:26:44 +01:00
Tobias Koppers 1cc87e9b53 added support for nested var in the ProvidePlugin 2014-10-16 22:31:20 +02:00
Tobias Koppers 3170b76b22 webpack 1.0 beta
moved many options to plugins
#113
2013-12-17 23:21:49 +01:00
Tobias Koppers 05152cee7f added provide plugin and option 2013-02-10 20:37:30 +01:00