Skip to content

Commit

Permalink
Modify webpack to fix extension watch problemMatcher
Browse files Browse the repository at this point in the history
  • Loading branch information
SchoofsKelvin committed Jun 28, 2021
1 parent cca8be2 commit 5e5286d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,20 @@ class CopyPuttyExecutable {
}
}

class ProblemMatcherReporter {
/**
* @param {webpack.Compiler} compiler
*/
apply(compiler) {
compiler.hooks.beforeCompile.tap('ProblemMatcherReporter-BeforeCompile', () => {
console.log('Compilation starting');
});
compiler.hooks.afterCompile.tap('ProblemMatcherReporter-AfterCompile', () => {
console.log('Compilation finished');
});
}
}

/**@type {webpack.Configuration}*/
const config = {
mode: 'development',
Expand Down Expand Up @@ -80,6 +94,7 @@ const config = {
plugins: [
new CleanWebpackPlugin(),
new CopyPuttyExecutable(),
new ProblemMatcherReporter(),
],
optimization: {
splitChunks: {
Expand Down

0 comments on commit 5e5286d

Please sign in to comment.