Developmint / nuxt-purgecss

Drop superfluous CSS! A neat PurgeCSS wrapper for Nuxt.js
MIT License
478 stars 18 forks source link

Add Nuxt build indicator to whitelist #80

Closed homerjam closed 4 years ago

manniL commented 4 years ago

As purgecss should usually not run in dev mode, the build indicator shouldn't be part of the whitelist IMO.

homerjam commented 4 years ago

How about only if isDev is true?

manniL commented 4 years ago

How about only if isDev is true?

That might be a considerable change, yeah 👍🏻

homerjam commented 4 years ago

Do you prefer:

// Line 28
    whitelist: ['body', 'html', 'nuxt-progress', 'nuxt__build_indicator', '__nuxt', '__layout']
      .filter(selector => this.options.dev || selector !== 'nuxt__build_indicator'),

or

// Line 44
  if (this.options.dev) {
    defaults.whitelist.push('nuxt__build_indicator')
  }
manniL commented 4 years ago

Do you prefer:

// Line 28
    whitelist: ['body', 'html', 'nuxt-progress', 'nuxt__build_indicator', '__nuxt', '__layout']
      .filter(selector => this.options.dev || selector !== 'nuxt__build_indicator'),

or

// Line 44
  if (this.options.dev) {
    defaults.whitelist.push('nuxt__build_indicator')
  }

sorry for the late answer! The latter is preferred.

manniL commented 4 years ago

Please apply your changes to the most recent version and resolve merge conflicts ☺️

homerjam commented 4 years ago

I made #85 instead - seems better due to the refactor