Skip to content

Commit 989566b

Browse files
committed
Adds better support for Webpack 5
1 parent af5c9c2 commit 989566b

File tree

3 files changed

+247
-134
lines changed

3 files changed

+247
-134
lines changed

README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,30 @@ The following example shows how to add problem matchers to your project:
4040
}
4141
```
4242

43-
👉 Using Webpack v4: In order for the _watch_ matchers to work properly, you must add `--info-verbosity verbose` to your webpack watch command e.g. `webpack --watch --info-verbosity verbose` as this instructs webpack to output lifecycle event messages for each re-compile
43+
### Webpack v5 (webpack-cli@4)
4444

45-
👉 Using Webpack v5 or later: In order for the _watch_ matchers to work properly in Webpack v4, you must add `--info-verbosity verbose` to your webpack watch command e.g. `webpack --watch --info-verbosity verbose` as this instructs webpack to output lifecycle event messages for each re-compile
45+
👉 Using Webpack v5 or later: In order for the _watch_ matchers to work properly in Webpack v4, you must add `--info-verbosity verbose` to your webpack watch command e.g. `webpack --watch --info-verbosity verbose` as this instructs webpack to output lifecycle event messages for each re-compile.
46+
47+
### Webpack v4 (webpack-cli@3)
48+
49+
n order for the _watch_ matchers to work properly, you must add `infrastructureLogging: { level: "log" }` to your `webpack.config.js` as this instructs webpack to output lifecycle event messages for each re-compile.
50+
51+
For example:
52+
53+
```js
54+
// webpack.config.js
55+
module.exports = {
56+
// ...the webpack configuration
57+
infrastructureLogging: {
58+
level: 'log',
59+
},
60+
};
61+
```
4662

4763
👉 In addition, when using the **\$ts-checker-webpack**, **\$ts-checker-webpack-watch**, **\$ts-checker-eslint-webpack**, and **\$ts-checker-eslint-webpack-watch** matchers, you must also set `formatter: 'basic'` in your [fork-ts-checker-webpack-plugin options](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/tree/alpha#options)
4864

65+
## Custom Usage
66+
4967
You can also use any of the problem matchers as a base problem matcher for your own custom needs:
5068

5169
```json

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"name": "Eric Amodio",
88
"email": "eamodio@gmail.com"
99
},
10-
"publisher": "eamodio",
10+
"publisher": "amodio",
1111
"license": "SEE LICENSE IN LICENSE",
1212
"homepage": "https://github.com/eamodio/vscode-tsl-problem-matcher/blob/master/README.md",
1313
"bugs": {
@@ -64,10 +64,10 @@
6464
"background": {
6565
"activeOnStart": true,
6666
"beginsPattern": {
67-
"regexp": "Compiling.*?|Compilation .*?starting"
67+
"regexp": "[Cc]ompiling.*?|[Cc]ompil(ation|er) .*?starting"
6868
},
6969
"endsPattern": {
70-
"regexp": "[Cc]ompiled (.*?successfully|with .*?error)|[Cc]ompilation .*?finished"
70+
"regexp": "[Cc]ompiled (.*?successfully|with .*?error)|[Cc]ompil(ation|er) .*?finished"
7171
}
7272
}
7373
},
@@ -110,10 +110,10 @@
110110
"background": {
111111
"activeOnStart": true,
112112
"beginsPattern": {
113-
"regexp": "Compiling.*?|Compilation .*?starting"
113+
"regexp": "[Cc]ompiling.*?|[Cc]ompil(ation|er) .*?starting"
114114
},
115115
"endsPattern": {
116-
"regexp": "[Cc]ompiled (.*?successfully|with .*?error)|[Cc]ompilation .*?finished"
116+
"regexp": "[Cc]ompiled (.*?successfully|with .*?error)|[Cc]ompil(ation|er) .*?finished"
117117
}
118118
}
119119
},
@@ -156,10 +156,10 @@
156156
"background": {
157157
"activeOnStart": true,
158158
"beginsPattern": {
159-
"regexp": "Compiling.*?|Compilation .*?starting"
159+
"regexp": "[Cc]ompiling.*?|[Cc]ompil(ation|er) .*?starting"
160160
},
161161
"endsPattern": {
162-
"regexp": "[Cc]ompiled (.*?successfully|with .*?error)|[Cc]ompilation .*?finished"
162+
"regexp": "[Cc]ompiled (.*?successfully|with .*?error)|[Cc]ompil(ation|er) .*?finished"
163163
}
164164
}
165165
},
@@ -203,10 +203,10 @@
203203
"background": {
204204
"activeOnStart": true,
205205
"beginsPattern": {
206-
"regexp": "Compiling.*?|Compilation .*?starting"
206+
"regexp": "[Cc]ompiling.*?|[Cc]ompil(ation|er) .*?starting"
207207
},
208208
"endsPattern": {
209-
"regexp": "[Cc]ompiled (.*?successfully|with .*?error)|[Cc]ompilation .*?finished"
209+
"regexp": "[Cc]ompiled (.*?successfully|with .*?error)|[Cc]ompil(ation|er) .*?finished"
210210
}
211211
}
212212
}
@@ -219,7 +219,7 @@
219219
},
220220
"devDependencies": {
221221
"@types/vscode": "1.37.0",
222-
"prettier": "2.2.1",
223-
"vsce": "1.85.1"
222+
"prettier": "2.4.1",
223+
"vsce": "1.100.1"
224224
}
225225
}

0 commit comments

Comments
 (0)