const glob = require("glob");
const { PurgeCSSPlugin } = require("purgecss-webpack-plugin");

module.exports = {
  plugins: [
    new PurgeCSSPlugin({
      safelist: {
        standard: [
          /fade/,
          /show/,
          /collapse/,
          /collapsing/,
          /dropdown/,
          /offcanvas/,
          /toast/,
          /modal/,
          /pagination/,
          /^leaflet/,
          /lightbox/,
          /lb/,
        ],
        greedy: [/page/],
      },

      paths: glob.sync("./src/**/*", { nodir: true }),
    }),
  ],
};
