docusaurus-node-polyfills
v1.0.0
Published
A tiny wrapper around node-polyfill-webpack-plugin to support in docusaurus
Downloads
11,858
Readme
A tiny wrapper around node-polyfill-webpack-plugin to support node-builtins
in docusaurus. Huge thanks for the webpack plugin, which makes it easy here.
Install it from npm using
npm install docusaurus-node-polyfills --save-dev
In docusaurus.config.json
add the polyfill in the plugins section
plugins: ['docusaurus-node-polyfills']
You can exclude builtin to not be polyfilled. For more details visit node-polyfill-webpack-plugin
For passing, you need to setup the plugin in this way.
plugins: [['docusaurus-node-polyfills', { excludeAliases: ['console']}]]