Sha256: 830a2658c29f7b09165f2174b2e70fe3d398d1ad33c35d385e9353f4d0efca3d
Contents?: true
Size: 578 Bytes
Versions: 3
Compression:
Stored size: 578 Bytes
Contents
const PurgecssPlugin = require('purgecss-webpack-plugin') const glob = require('glob-all') const path = require('path') // ensure classes with special chars like -mt-1 and md:w-1/3 are included class TailwindExtractor { static extract(content) { return content.match(/[A-z0-9-:\/]+/g) } } module.exports = new PurgecssPlugin({ paths: glob.sync([ path.join(__dirname, '../../../app/javascript/**/*.js'), path.join(__dirname, '../../../app/views/**/*.erb') ]), extractors: [{ extractor: TailwindExtractor, extensions: ['html', 'js', 'erb'] }] })
Version data entries
3 entries across 3 versions & 1 rubygems