diff --git a/.gitignore b/.gitignore index 1b34df51..f066d861 100755 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ # generated files .docusaurus .cache-loader +versioned* # misc .DS_Store @@ -17,4 +18,4 @@ npm-debug.log* yarn-debug.log* -yarn-error.log* \ No newline at end of file +yarn-error.log* diff --git a/docusaurus.config.js b/docusaurus.config.js index e3a5e5e2..ccd58621 100755 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -119,5 +119,5 @@ module.exports = { }, ], ], - plugins: ['docusaurus-image-loader'] + plugins: ['docusaurus-image-loader', require.resolve('./docusuarusWebpack5Plugin')], }; diff --git a/docusuarusWebpack5Plugin.js b/docusuarusWebpack5Plugin.js new file mode 100644 index 00000000..174aa0c4 --- /dev/null +++ b/docusuarusWebpack5Plugin.js @@ -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'], + }) + ] + } + }, + }; +}; diff --git a/versions.json b/versions.json index 57924b0a..f6a66b71 100644 --- a/versions.json +++ b/versions.json @@ -1,4 +1,5 @@ [ + "7.1.0", "7.0.x", "5.4.x", "5.2.x"