I'm using PurgeCSS alongside Vite and I would like to disable PurgeCSS for some stylesheets. It is possible thanks to comments /* purgecss ignore */
but I'm importing some CSS from libs directly in chunked & lazy loaded JS files like :
fancybox_controller.js
import 'fancybox/dist/scss/jquery.fancybox.scss'
import 'fancybox/dist/js/jquery.fancybox'
import { Controller } from '@hotwired/stimulus'
export default class extends Controller {
open() {
$.fancybox({
padding: 4,
href: $(this.element).data('large'),
helpers: {
overlay: {
locked: false
}
}
})
}
}
Any way to disable PurgeCSS in that case ?