UNPKG

gatsby-theme-material-ui

Version:
43 lines (39 loc) 892 B
const pkg = require(`./package.json`); const defaultWebFontsConfig = { fonts: { google: [ { family: `Roboto`, variants: [`300`, `400`, `500`], }, ], }, }; module.exports = (themeOptions) => { const { muiPluginConfig = {}, webFontsConfig = defaultWebFontsConfig } = themeOptions; return { plugins: [ `gatsby-theme-material-ui-top-layout`, { resolve: `gatsby-plugin-material-ui`, options: { ...muiPluginConfig, }, }, { resolve: `gatsby-plugin-webfonts`, options: { ...webFontsConfig, }, }, { // This is only needed temporarily. Themes will automatically be transpiled in later versions. resolve: `gatsby-plugin-compile-es6-packages`, options: { modules: [pkg.name], }, }, ], }; };