index.mjs 430 B

12345678910111213141516171819202122
  1. // src/index.ts
  2. import createRollupPlugin from "rollup-plugin-purge-icons";
  3. function createPlugin(options = {}) {
  4. const parsedOptions = {
  5. content: [
  6. "**/*.html",
  7. "**/*.pug",
  8. "**/*.vue",
  9. "**/*.js",
  10. "**/*.ts"
  11. ],
  12. iconifyImportName: "@iconify/iconify",
  13. ...options
  14. };
  15. return {
  16. enforce: "pre",
  17. ...createRollupPlugin(parsedOptions)
  18. };
  19. }
  20. export {
  21. createPlugin as default
  22. };