Commit Graph

68 Commits

Author SHA1 Message Date
Tobias Koppers a877cd51d1 add presentational dependencies which are cheaper, but allow only templating 2019-10-30 07:49:20 +01:00
Tobias Koppers b2e7837288 replace Object.assign with object spread 2019-06-19 13:16:05 +02: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 1b402bcae1 Merge tag 'v4.28.0' into next
4.28.0
2018-12-19 14:05:17 +01:00
Isiah Meadows 18d7396835 Remove a broken hook 2018-12-17 01:23:03 -05:00
Florent Cailhol 3c50dba922 Remove global buildin 2018-12-07 08:59:41 +01:00
Florent Cailhol 002128c288 Do not polyfill node bindings by default 2018-12-07 08:58:26 +01:00
Florent Cailhol 8a10ea3c92 Type 'apply' method of plugins 2018-11-12 14:26:31 +01:00
Tobias Koppers 691a5b24b7 simplify addExpression 2018-07-30 22:39:30 +02:00
Florent Cailhol a19a0ebaa6 Refactor ProvidedDependency to avoid duplication 2018-07-30 22:38:28 +02:00
Florent Cailhol c545a02ba6 Convert NodeStuffPlugin 2018-07-30 22:37:34 +02:00
Florent Cailhol 9b7d9eb96f Fix review comments 2018-07-30 22:36:06 +02:00
Florent Cailhol f6a5053fb2 Add a way to inject provided modules 2018-07-30 22:35:52 +02:00
Tobias Koppers cf5f1d723c format existing code 2018-07-30 21:29:21 +02:00
Tobias Koppers 2b14ddc984 Merge tag 'v4.16.0' into next
4.16.0
2018-07-11 11:13:47 +02:00
Tobias Koppers 559cf94edb Simplify imports 2018-07-09 15:09:00 +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
Florent Cailhol 2a9452e51b Add brackets for multiline if/for statements 2018-05-29 15:45:44 +02:00
Tobias Koppers 5238159d21 run prettier on existing code 2018-02-25 02:00:20 +01:00
Florent Cailhol d4811b0d37 Use for-of loops instead of forEach 2018-01-23 22:53:18 +01:00
Florent Cailhol 9669c9e013 Use Parser#hooks instead of Tapable#plugin 2017-12-21 09:08:10 +01:00
Florent Cailhol 7dd41b55c6 Replace deprecated Tapable#apply by Plugin#apply 2017-12-20 11:53:56 +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 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 f7c2f8e470 Update code style to arrow functions 2017-11-08 11:56:01 +01:00
Joel Chen 8fec262c8c Support turn off NodeSourcePlugin with false option 2017-06-02 23:04:23 -07:00
Orlando Wenzinger 5e1cedf93b replace let with const for variables with no reassignment 2017-05-06 22:16:50 +02:00
Orlando Wenzinger 6d75f833c7 ES6 refactor of NodeSourcePlugin 2017-05-06 20:41:26 +02:00
Tim Sebastian d056ba7d40 extract `buildExpression` to ParserHelpers.addParsedVariableToModule
rewrite affected modules
2017-02-25 00:26:07 +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
Sean Larkin aa8d01bf8d refactor(eslint): Added no-unsed-vars, env specific .eslintrc's for buildin & hot (#3636)
* refactor(eslint): Added no-unsed-vars, env specific .eslintrc's for buildin & hot

* This change allows for buildin to now be part of the lint test by addition of an extra .eslintrc file which extends existing but sets es6 to false
* Turned on no-unused-vars for eslint, and then removed all warnings from turning that feature on
* Was getting notified of errors in "quote" property in eslintrc, so changed to correct value from error to 2.

* beautify

* swap invalid eslint config val
2016-12-30 09:43:49 -06:00
Kees Kluskens 644e3a009b Upgrade eslint (#3626)
* Upgrade eslint

* Pin down eslint version

* Temporary fix for difference between js-beautify and eslint

js-beautify suddenly requires a space between `while` here,
but everywhere else we use it without space.

* Remove redundant rules (present in eslint:recommended)

* Add rules comparable to js-beautify rules to eslint

* Add some forgotten files

* Ugh, fix some differences between eslint and js-beautify the nuclear way

* Add back variables
2016-12-29 10:10:41 -06:00
Joe Bateson a8bb6cdb1c refactor(es6): Replace object-assign polyfill with native method (#3608) 2016-12-28 13:07:28 -06:00
Tobias Koppers 8da6f6c81a don't shim shims and update node-libs 2016-11-23 11:31:24 +01:00
Alan Zhang 2e62b1207d Prefix path with ./ 2016-11-12 22:19:57 +08:00
Alan Zhang d4b73ec846 Apply change to Buffer, setImmediate, clearImmediate too. 2016-11-12 01:58:50 +08:00
Alan Zhang f9502b6612 Replace '\' with '/' to make windows generate same path string as other platforms. 2016-11-12 01:42:00 +08:00
Alan Zhang 4d1d18575b Change absolute path returned by getPathToModule() to relative path to fix issue #2215 2016-11-11 03:56:13 +08:00
Markus Kramer 9c5c6df64f replaced calls to Object.assign with objectAssign to support node 0.12.x (#3080) 2016-09-30 09:24:05 -05:00
Tobias Koppers 78a2f699e2 beautify 2016-09-15 00:50:07 +02: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 2ff9a247e2 better global support, even in strict mode 2016-05-06 11:36:36 +02:00
Tobias Koppers 461c49ab66 updated partly to new enhanced-resolve API 2016-01-02 00:21:54 +01:00
Tobias Koppers f4b9d5f57a Merge branch 'master' into webpack-2
Conflicts:
	lib/Compilation.js
	lib/Compiler.js
	lib/DefinePlugin.js
	lib/HotModuleReplacementPlugin.js
	lib/Parser.js
	lib/node/NodeSourcePlugin.js
	lib/node/OldNodeWatchFileSystem.js
	package.json
2015-04-27 20:22:13 +02:00
Tobias Koppers cebd3b9722 added linting 2015-04-23 23:55:50 +02:00
Tobias Koppers d2b1bca5d9 Remove compatibly mode for node.Buffer
#729
2015-03-05 21:46:54 +01:00
Tobias Koppers 5ca01e92f4 test case for resolving node buildin libs
webpack/webpack#747
2015-02-04 23:22:28 +01:00