Skip to content

Commit 0cac4f2

Browse files
committed
fix: Add a splittable default value
1 parent e099d3b commit 0cac4f2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export default class DocgenPlugin implements webpack.WebpackPluginInstance {
127127
const isExcluded = matchGlob(exclude);
128128
const isIncluded = matchGlob(include);
129129
// Property compiler.version is set only starting from webpack 5
130-
const webpackVersion = compiler.webpack?.version;
130+
const webpackVersion = compiler.webpack?.version || "";
131131
const isWebpack5 = parseInt(webpackVersion.split(".")[0], 10) >= 5;
132132

133133
compiler.hooks.compilation.tap(

0 commit comments

Comments
 (0)