Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
extend(config, { isDev }) {
if (!isDev) {
config.plugins.push(
new PurgecssPlugin({
// purgecss configuration
// https://github.com/FullHuman/purgecss
paths: glob.sync([
path.join(__dirname, './pages/**/*.vue'),
path.join(__dirname, './layouts/**/*.vue'),
path.join(__dirname, './components/**/*.vue')
]),
extractors: [
{
extractor: TailwindExtractor,
extensions: ['vue']
}
],
whitelist: ['html', 'body', 'nuxt-progress']
})
)
extend(config, { isDev, isClient }) {
if (!isDev && isClient) {
// Remove unused CSS using purgecss. See https://github.com/FullHuman/purgecss
// for more information about purgecss.
config.plugins.push(
new PurgecssPlugin({
paths: glob.sync([
path.join(__dirname, './pages/**/*.vue'),
path.join(__dirname, './layouts/**/*.vue'),
path.join(__dirname, './components/**/*.vue')
]),
whitelist: ['html', 'body']
})
)
}
}
}