esbuild-plugin-purgecss-2
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

esbuild-plugin-purgecss-2

npm version

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

Readme

Keywords

Package Sidebar

Install

npm i esbuild-plugin-purgecss-2

Weekly Downloads

15

Version

1.0.1

License

ISC

Unpacked Size

184 kB

Total Files

4

Last publish

Collaborators

  • arslanhawn