icons.js 375 B

1234567891011121314151617
  1. import { getIcons } from '..'
  2. const PLUGIN_ICONS_ID = 'isme:icons'
  3. export function pluginIcons() {
  4. return {
  5. name: 'isme:icons',
  6. resolveId(id) {
  7. if (id === PLUGIN_ICONS_ID)
  8. return `\0${PLUGIN_ICONS_ID}`
  9. },
  10. load(id) {
  11. if (id === `\0${PLUGIN_ICONS_ID}`) {
  12. return `export default ${JSON.stringify(getIcons())}`
  13. }
  14. },
  15. }
  16. }