Closed tranvanhieu01012002 closed 5 days ago
to make it work, you must either specify the paths to purge like this:
export default defineConfig({
plugins: [
laravel(...),
purge({
paths: ["resources/views/**/*.blade.php"]
})
]
})
or don't specify the paths at all and let the plugin default it to resources/{js,views}/**/*.{blade.php,svelte,vue,html}
:
export default defineConfig({
plugins: [
laravel(...),
purge()
]
})
when trying out your way i realized, that path defaulting didn't work in 0.3.2. its now fixed as of 0.3.3
I ran your example and it can reduce css size, but css doesn't work Build with
laravel
onlyBuild with
"@erbelion/vite-plugin-laravel-purgecss": "^0.3.2"
this is
vite.config.js