Mihail Bodrov
52954228ee
Remove needless includes
2018-02-01 02:59:08 +03:00
Tobias Koppers
e6fb58d1fc
Merge pull request #6273 from ooflorent/fix-4857/unreachable_branches
...
Eliminate unreachable branches
2018-01-12 10:55:27 +01:00
Florent Cailhol
2cf8660f11
Add tests to improve coverage
2018-01-12 09:23:02 +01:00
Florent Cailhol
c9ff97fa7e
Eliminate unreachable branches
...
Webpack does not transpile unreachable branches leaving `import` expressions
in the code. This PR modifies `ConstPlugin` to remove the unreachable branch.
Before:
```js
if (true) { 1 } else { import("a") }
if (false) { import("a") } else { 1 }
true ? 1 : import("a");
false ? import("a") : 1;
```
After:
```js
if (true) { 1 } else {}
if (false) {} else { 1 }
true ? 1 : null;
false ? null : 1;
```
2018-01-11 19:35:24 +01:00
EugeneHlushko
2aab060f26
Refactor: indexOf >< checks to includes
2018-01-11 18:58:39 +02:00
Florent Cailhol
9669c9e013
Use Parser#hooks instead of Tapable#plugin
2017-12-21 09:08:10 +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
Tim Sebastian
82eec175af
convert more usages of BasicEvaluatedExpression with ParserHelpers
2017-01-21 13:51:35 +11:00
Tobias Koppers
8e69a80847
code linting
2017-01-11 12:29:01 +01:00
Will Mendes
ef8c6fb179
refactor(ConstPlugin): upgrade to ES6 ( #3845 )
2017-01-08 12:07:44 -06: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
1c961afe7b
fixed small issues with new loader-runner
2015-12-30 16:39:10 +01:00
Tobias Koppers
dd73373d86
fixed #1044 and fixed #1244
2015-07-22 23:40:46 +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
d3a7994e35
expose `loc` for every Dependency
2015-05-10 18:31:58 +02:00
Tobias Koppers
cebd3b9722
added linting
2015-04-23 23:55:50 +02:00
Tobias Koppers
a37948d114
added options.define, evaluate conditionals, fixes #99
2013-09-13 11:17:57 +02:00
Tobias Koppers
c88bce3b08
use variable for __resourceQuery
2013-02-17 10:30:47 +01:00
Tobias Koppers
2183f05db8
added __resourceQuery, __dir/__filename compile time constant
2013-02-16 22:23:22 +01:00
Tobias Koppers
ee01837d66
Refactored everything for 0.9
2013-01-30 18:49:25 +01:00