erbelion / vite-plugin-laravel-purgecss

A Vite plugin that integrates PurgeCSS with Laravel template assets. Apart from Blade, it also supports frontend frameworks such as Svelte, Vue, React and Angular. It works well with Inertia.
MIT License
26 stars 4 forks source link

How can I define custom url rather than your template? #3

Closed devbipu closed 1 year ago

devbipu commented 1 year ago

Hi, I'm working on Laravel & Vue.js project. I've a Vuejs file in resources/frontend/ Now how can I define the URL in the config? I can see your template only compile your define path files. How can I purge custom dir files?

erbelion commented 1 year ago

@devbipu use paths option instead of templates option, like:

import purge from '@erbelion/vite-plugin-laravel-purgecss'

export default {
    plugins: [
        purge({
            paths: ['resources/frontend/**/*.vue']
        })
    ]
}

then, all .vue files inside resources/frontend dir will be purged.

devbipu commented 1 year ago

Thank you :)