mirror of
https://github.com/misenhower/splatoon2.ink.git
synced 2026-03-22 01:34:11 -05:00
25 lines
884 B
JavaScript
25 lines
884 B
JavaScript
const IN_PRODUCTION = process.env.NODE_ENV === 'production'
|
|
|
|
module.exports = {
|
|
plugins: [
|
|
IN_PRODUCTION && require('@fullhuman/postcss-purgecss')({
|
|
content: [
|
|
`./src/web/html/**/*.html`,
|
|
`./src/web/components/**/*.vue`
|
|
],
|
|
defaultExtractor (content) {
|
|
const contentWithoutStyleBlocks = content.replace(/<style[^]+?<\/style>/gi, '')
|
|
return contentWithoutStyleBlocks.match(/[A-Za-z0-9-_/:]*[A-Za-z0-9-_/]+/g) || []
|
|
},
|
|
whitelist: [
|
|
'.title:not(.is-spaced)+.subtitle', // Fix subtitle spacing
|
|
// Dynamic merchandise types
|
|
'.merchandise-box.shoes',
|
|
'.merchandise-box.head',
|
|
'.merchandise-box.clothes',
|
|
],
|
|
whitelistPatterns: [ /-(leave|enter|appear)(|-(to|from|active))$/, /^(?!(|.*?:)cursor-move).+-move$/, /^router-link(|-exact)-active$/, /data-v-.*/ ],
|
|
})
|
|
],
|
|
}
|