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