Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
rcrichton committed Mar 14, 2023
1 parent 6736a8f commit 2d14a00
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# generated files
.docusaurus
.cache-loader
versioned*

# misc
.DS_Store
Expand All @@ -17,4 +18,4 @@

npm-debug.log*
yarn-debug.log*
yarn-error.log*
yarn-error.log*
2 changes: 1 addition & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,5 @@ module.exports = {
},
],
],
plugins: ['docusaurus-image-loader']
plugins: ['docusaurus-image-loader', require.resolve('./docusuarusWebpack5Plugin')],
};
20 changes: 20 additions & 0 deletions docusuarusWebpack5Plugin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const webpack = require('webpack');

// eslint-disable-next-line
module.exports = function (context, options) {
return {
name: 'custom-docusaurus-plugin',
// eslint-disable-next-line
configureWebpack(config, isServer, utils) {
return {
plugins: [
// Work around for Buffer is undefined:
// https://github.com/webpack/changelog-v5/issues/10
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
})
]
}
},
};
};
1 change: 1 addition & 0 deletions versions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[
"7.1.0",
"7.0.x",
"5.4.x",
"5.2.x"
Expand Down

0 comments on commit 2d14a00

Please sign in to comment.