const { tailwindExtractor } = require("tailwindcss/lib/lib/purgeUnusedStyles"); const { fontFamily } = require("tailwindcss/defaultTheme"); const colors = require("tailwindcss/colors"); module.exports = { mode: "aot", purge: { content: ["./src/**/*.{html,js,svelte,ts}"], options: { defaultExtractor: (content) => [ // If this stops working, please open an issue at https://github.com/svelte-add/tailwindcss/issues rather than bothering Tailwind Labs about it ...tailwindExtractor(content), // Match Svelte class: directives (https://github.com/tailwindlabs/tailwindcss/discussions/1731) ...[...content.matchAll(/(?:class:)*([\w\d-/:%.]+)/gm)].map( ([_match, group, ..._rest]) => group, ), ], }, safelist: [/^svelte-[\d\w]+$/], }, theme: { extend: { fontFamily: { sans: ["Inter", ...fontFamily.sans], serif: [...fontFamily.serif], mono: ["Fira Mono", ...fontFamily.mono], }, colors: { transparent: "transparent", current: "currentColor", black: colors.black, white: colors.white, gray: colors.trueGray, "cool-gray": colors.blueGray, blue: colors.blue, indigo: colors.indigo, red: colors.rose, orange: colors.orange, yellow: colors.amber, pink: colors.pink, }, }, }, variants: { extend: {}, }, plugins: [], };