UNPKG

gatsby-plugin-material-symbols

Version:

Easily add Material Symbols to your Gatsby site, with various Gatsby-specific performance optimizations built-in.

65 lines 3.17 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.onCreateWebpackConfig = exports.pluginOptionsSchema = void 0; const pluginOptionsSchema = ({ Joi }) => { return Joi.object({ embedFonts: Joi .boolean() .default(true) .description("When true, embeds the font file in the CSS as base64.\nWhen false, links to the font file via gstatic, which will add more network requests."), extraIcons: Joi .any() .default([]) .description("A list of additional icons to always include, even if they are not found during static analysis.\nThis is especially useful if you are changing the icon at runtime which will not be caught during static analysis.\nYou can optionally include which page the icons are used on if you have perPage enabled."), includeFill: Joi .boolean() .default(false) .description("When true, includes the entirety of the fill property in the font file.\nThis is useful if you change the fill to something that might not be caught during static analysis."), weightRange: Joi .array() .default([]) .description("A range of weights to always include in the font file.\nThis is useful if you change the weight to something that might not be caught during sttaic analysis."), gradeRange: Joi .array() .default([]) .description("A range of grades to always include in the font file.\nThis is useful if you change the grade to something that might not be caught during static analysis."), sizeRange: Joi .array() .default([]) .description("A range of sizes to always include in the font file.\nThis is useful if you change the size to something that might not be caught during static analysis."), extraStyles: Joi .any() .default([]) .description("A list of styles to always add to the font file, even if they are not found during static analysis.\nThis is useful if you change the style to something that might not be caught during static analysis.\nValid styles are 'outlined', 'rounded', and 'sharp'."), verbose: Joi .boolean() .default(false) .description("Writes extra information to the console when true.") }); }; exports.pluginOptionsSchema = pluginOptionsSchema; const onCreateWebpackConfig = ({ actions: { setWebpackConfig } }) => { setWebpackConfig({ resolve: { fallback: { fs: false, tls: false, net: false, path: false, zlib: false, http: false, https: false, stream: false, crypto: false, util: false, assert: false, os: false, constants: false, url: false, module: false } } }); }; exports.onCreateWebpackConfig = onCreateWebpackConfig; //# sourceMappingURL=gatsby-node.js.map