Developmint / nuxt-purgecss

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

"Module is not enabled" when running Nuxt generate #81

Closed simplenotezy closed 4 years ago

simplenotezy commented 4 years ago

When running nuxt generate I see this warning:

 WARN  Module is not enabled                                                 nuxt-purgecss 14:29:17

Version: ^0.2.1

This is my nuxt.config file:

purgeCSS: {
    // mode: 'postcss',
    enabled: ({ isDev, isClient }) => (!isDev && isClient), // or `false` when in dev/debug mode
    paths: [
        'components/**/*.vue',
        'layouts/**/*.vue',
        'pages/**/*.vue',
        'plugins/**/*.js'
    ],
    styleExtensions: ['.css'],
    whitelist: ['body', 'html', 'nuxt-progress'],
    extractors: [
        {
            extractor(content) {
                return content.match(/[A-z0-9-:\\/]+/g)
            },
            extensions: ['html', 'vue', 'js']
        }
    ]
},
manniL commented 4 years ago
  1. Please provide a reproduction (repo/codesandbox)
  2. I highly recommend not copy-pasting the default config values. Instead, only alter the values you really want to change. That makes debugging easier.
simplenotezy commented 4 years ago

Well, seems like if I remove the default configuration as you said, it doesn't show this error. Initially when setting it up, it seemed like I needed to add it.

I'll keep you posted if I see more errors.

manniL commented 4 years ago

Stale