Skip to content

Commit

Permalink
Migrate templates to ESM
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Oct 13, 2023
1 parent 2f522b2 commit 5468bf9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
// There are various equivalent ways to declare your Docusaurus config.
// See: https://docusaurus.io/docs/api/docusaurus-config

const {themes} = require('prism-react-renderer');

const lightCodeTheme = themes.github;
const darkCodeTheme = themes.dracula;
import {themes as prismThemes} from 'prism-react-renderer';

/** @type {import('@docusaurus/types').Config} */
const config = {
Expand Down Expand Up @@ -135,10 +132,10 @@ const config = {
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
}),
};

module.exports = config;
export default config;
2 changes: 1 addition & 1 deletion packages/create-docusaurus/templates/shared/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ const sidebars = {
*/
};

module.exports = sidebars;
export default sidebars;

0 comments on commit 5468bf9

Please sign in to comment.