We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e08cf7f commit e099d3bCopy full SHA for e099d3b
1 file changed
src/plugin.ts
@@ -126,7 +126,8 @@ export default class DocgenPlugin implements webpack.WebpackPluginInstance {
126
const { exclude = [], include = ["**/**.tsx"] } = this.options;
127
const isExcluded = matchGlob(exclude);
128
const isIncluded = matchGlob(include);
129
- const webpackVersion = compiler.webpack.version;
+ // Property compiler.version is set only starting from webpack 5
130
+ const webpackVersion = compiler.webpack?.version;
131
const isWebpack5 = parseInt(webpackVersion.split(".")[0], 10) >= 5;
132
133
compiler.hooks.compilation.tap(
0 commit comments