Skip to content

Commit d2a69f7

Browse files
committed
currentBundler retrocompatibility
1 parent 57a5b0c commit d2a69f7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docusaurus.config.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,3 +525,17 @@ module.exports = {
525525
},
526526
}),
527527
};
528+
529+
export default function (context, options) {
530+
return {
531+
name: 'custom-docusaurus-plugin',
532+
configureWebpack(config, isServer, {currentBundler}) {
533+
const bundler = (currentBundler.instance ?? require("webpack"))
534+
return {
535+
plugins: [
536+
new bundler.DefinePlugin({}),
537+
]
538+
};
539+
},
540+
};
541+
}

0 commit comments

Comments
 (0)