Last active
January 14, 2022 23:23
-
-
Save fatihsolhan/6cdbdaf3abdf815d36ea0449e7d0e250 to your computer and use it in GitHub Desktop.
Module file for auto importing material design icons in Nuxt.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { resolve } from 'path' | |
const icons = ['Phone', 'Alarm'] | |
export default function () { | |
this.nuxt.hook('components:dirs', (dirs) => { | |
dirs.push({ | |
path: resolve('node_modules/vue-material-design-icons'), | |
prefix: 'MaterialIcon', | |
pattern: `**/@(${icons.join('|')}).vue`, | |
}) | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment