ahabhgk
9c9cb0bcdd
feat: override strict for javascript module
2024-07-03 16:32:36 +08:00
alexander.akait
4809421990
refactor(types): more
2023-06-21 19:00:24 +03:00
alexander.akait
60e5e13eb8
refactor: more types
2023-05-25 01:41:32 +03:00
Sean Larkin
fa4cbf11a1
add more module type constants, use them across codebase
2023-03-31 10:56:32 -07:00
Tobias Koppers
b9c50fdb09
fix jsdoc documentations
2020-04-28 19:42:58 +02:00
Tobias Koppers
a877cd51d1
add presentational dependencies which are cheaper, but allow only templating
2019-10-30 07:49:20 +01:00
Florent Cailhol
d881bb4c8f
Add types to various plugins
2018-11-02 21:06:35 +01:00
Tobias Koppers
cf5f1d723c
format existing code
2018-07-30 21:29:21 +02:00
Tobias Koppers
559cf94edb
Simplify imports
2018-07-09 15:09:00 +02:00
byzyk
47b888650a
add types
2018-06-20 16:52:27 +04:00
Tobias Koppers
5238159d21
run prettier on existing code
2018-02-25 02:00:20 +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
Florent Cailhol
08ddad2e10
Replace NormalModuleFactory#plugin() calls
2017-12-14 14:42:49 +01:00
Florent Cailhol
f737b26260
Remove some plugin calls
2017-12-14 14:42:49 +01:00
Tobias Koppers
ffb977fed4
refactor meta -> buildMeta, add factoryMeta
...
add compat layer to Module.meta
2017-12-12 16:57:50 +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
Tim Sebastian
1d3265445c
use const where applicable in UseStrictPlugin
2017-02-05 12:20:22 +11:00
Tobias Koppers
8e69a80847
code linting
2017-01-11 12:29:01 +01: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
Sean Larkin
852c5c1cdd
added use strict to help istanbul not freak out over let and const in node v4
2016-12-28 14:44:06 -06:00
Sean Larkin
000b757b1e
refactor(es6): Update UseStrictPlugin to es6 class
2016-12-28 13:38:20 -06:00
Johannes Ewald
b51f2b0a0f
Fix double "use strict"
...
This fixes a problem where webpack rendered modules with two "use strict" statements at the beginning
2016-12-14 12:35:12 +01: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
b98debb809
keep strict mode even if code is inserted
...
fixes #1970
2016-05-05 17:45:58 +02:00