1.0.0 • Published 3 years ago

docusaurus-node-polyfills v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

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']}]]