Skip to content

CookbookDev/docusaurus-jsx-runtime-fallback-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

docusaurus-jsx-runtime-fallback-plugin

Super simple plugin to fallback "react/jsx-runtime" to "react/jsx-runtime.js" for Docusaurus v2, as there is no way to specify this in the Docusaurus config. ¯_(ツ)_/¯

return {
    name: 'docusaurus-jsx-runtime-fallback-plugin',
    configureWebpack() {
      return {
        resolve: {
          fallback: {
            "react/jsx-runtime": 'react/jsx-runtime.js'
          }
        },
      };
    },
  };

How to use

yarn add --dev @cookbookdev/docusaurus-jsx-runtime-fallback-plugin
// docusaurus.config.js
module.exports = {
  plugins: [
    // ...
    "@cookbookdev/docusaurus-jsx-runtime-fallback-plugin"
  ],
};

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published