From d090ba51b49bfa0f059a978e16a7b6799a5f1b14 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Mon, 14 Dec 2020 16:25:55 +0800 Subject: [PATCH] chore: fix purge --- tailwind.config.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tailwind.config.js b/tailwind.config.js index b8aa72d..cd1f0ab 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,10 +1,20 @@ /* eslint-disable @typescript-eslint/no-var-requires */ const colors = require('tailwindcss/colors') +const typography = require('@tailwindcss/typography') module.exports = { purge: { enabled: process.env.NODE_ENV === 'production', - content: ['./index.html', './src/**/*.vue', './src/**/*.js', './src/**/*.ts'], + content: [ + './index.html', + './src/**/*.vue', + './src/**/*.md', + './src/**/*.js', + './src/**/*.ts', + ], + options: { + safelist: ['prose', 'prose-sm', 'm-auto'], + }, }, variants: { cursor: ['responsive', 'disabled'], @@ -12,10 +22,9 @@ module.exports = { borderColor: ['dark', 'active', 'focus', 'disabled'], textColor: ['dark', 'hover', 'active', 'disabled'], opacity: ['dark', 'hover', 'active', 'focus', 'disabled'], - typography: ['dark'], }, darkMode: 'class', - plugins: [require('@tailwindcss/typography')], + plugins: [typography], theme: { extend: { colors: {