Disable purgecss to fix missing css

This commit is contained in:
BenRoe 2019-07-14 15:49:56 +02:00
parent 27e0dbd3a2
commit 053eacd4d1
3 changed files with 22 additions and 16 deletions

View File

@ -1,13 +0,0 @@
import { config, library } from '@fortawesome/fontawesome-svg-core'
import { faGithub } from '@fortawesome/free-brands-svg-icons'
import { faKeyboard } from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
import '@fortawesome/fontawesome-svg-core/styles.css'
// Make sure you tell Font Awesome to skip auto-inserting CSS into the <head>
config.autoAddCss = false;
library.add(faGithub, faKeyboard)
export default function (Vue) {
Vue.component('font-awesome', FontAwesomeIcon)
}

View File

@ -19,7 +19,15 @@ module.exports = {
},
plugins: [
{
use: 'gridsome-plugin-tailwindcss'
use: 'gridsome-plugin-tailwindcss',
options: {
// tailwindConfig: './some/file/js',
// purgeConfig: {},
// presetEnvConfig: {},
shouldPurge: false, // https://www.purgecss.com/with-postcss
shouldImport: true, // https://github.com/postcss/postcss-import
shouldTimeTravel: true, // https://github.com/csstools/postcss-preset-env
}
},
{
use: '@gridsome/source-filesystem',

View File

@ -2,15 +2,26 @@
// The Client API can be used here. Learn more: gridsome.org/docs/client-api
// Add global components
import './assets/css/tailwind.css'
import DefaultLayout from '~/layouts/Default.vue'
import DocsLayout from '~/layouts/Docs.vue'
import { config, library } from '@fortawesome/fontawesome-svg-core'
import { faGithub } from '@fortawesome/free-brands-svg-icons'
import { faKeyboard } from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
import '@fortawesome/fontawesome-svg-core/styles.css'
import '~/assets/css/tailwind.css'
// Make sure you tell Font Awesome to skip auto-inserting CSS into the <head>
config.autoAddCss = false
library.add(faGithub, faKeyboard)
export default function (Vue, { router, head, isClient }) {
// Set default layout as a global component
Vue.component('Layout', DefaultLayout)
Vue.component('DocsLayout', DocsLayout)
// router.options.linkActiveClass = 'is-active'
Vue.component('font-awesome', FontAwesomeIcon)
}