Skip to content

Full Alert css loading in localhost, not to production site #119

Answered by h-enk
raqueeb asked this question in Support
Discussion options

You must be logged in to vote

Re. alert message link:

If it works OK on localhost, but not in production, it probably has something to do with PurgeCSS.

Add to ./config/postcss.config.js in the whitelister section './assets/scss/components/_alerts.scss',, like so:

const autoprefixer = require('autoprefixer');
const purgecss = require('@fullhuman/postcss-purgecss');
const whitelister = require('purgecss-whitelister');

module.exports = {
  plugins: [
    autoprefixer(),
    purgecss({
      content: [
        './layouts/**/*.html',
        './content/**/*.md',
      ],
      safelist: [
        'lazyloaded',
        ...whitelister([
          './assets/scss/components/_code.scss',
          './assets/scss/components/_s…

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@raqueeb
Comment options

Answer selected by raqueeb
Comment options

You must be logged in to vote
1 reply
@raqueeb
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@h-enk
Comment options

h-enk Feb 9, 2021
Maintainer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants