From 9a11e0f4a38297006b89cc7bb2a60734111582e0 Mon Sep 17 00:00:00 2001 From: Leonardo Bishop Date: Sun, 10 Mar 2024 00:13:25 +0000 Subject: Migrate to nuxt --- plugins/fontawesome.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 plugins/fontawesome.ts (limited to 'plugins/fontawesome.ts') diff --git a/plugins/fontawesome.ts b/plugins/fontawesome.ts new file mode 100644 index 0000000..a6a1a85 --- /dev/null +++ b/plugins/fontawesome.ts @@ -0,0 +1,16 @@ +import { library, config } from '@fortawesome/fontawesome-svg-core' +import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome' +import { fas } from '@fortawesome/free-solid-svg-icons' +import { far } from '@fortawesome/free-regular-svg-icons' + +// This is important, we are going to let Nuxt worry about the CSS +config.autoAddCss = false + +// You can add your icons directly in this plugin. See other examples for how you +// can add other styles or just individual icons. +library.add(fas) +library.add(far) + +export default defineNuxtPlugin((nuxtApp) => { + nuxtApp.vueApp.component('font-awesome-icon', FontAwesomeIcon, {}) +}) -- cgit v1.2.3-70-g09d2