1.0.1 • Published 2 years ago

esbuild-plugin-purgecss-2 v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

esbuild-plugin-purgecss-2

based on esbuild-plugin-purgecss

Description

This allows you to pass content (html/css) in the plugin.

Why I created this?

Please read here: How To Setup Custom ESBuild with SCSS, PurgeCSS & LiveServer?

Usage

npm i -D esbuild-plugin-purgecss-2
const glob = require("glob-all");
const purgecssPlugin2 = require("esbuild-plugin-purgecss-2")

esbuild.build({
    ...,
    plugins: [
        purgecssPlugin2({
            content: glob.sync([
                "./*.html",
                "./views/**/*.html",
                "./src/scripts/*.js",
                "./src/scripts/**/*.js",
            ])
        })
    ]
})

Complete Example on How to Setup a Custom ESBuild with SCSS, PurgeCSS & LiveServer?

Please refer to my github repository: custom-esbuild-with-scss-purgecss-and-liveserver

1.0.1

2 years ago

1.0.0

2 years ago

0.0.1

2 years ago