{"id":198,"date":"2023-09-11T22:38:34","date_gmt":"2023-09-11T13:38:34","guid":{"rendered":"https:\/\/m-potion.com\/?p=198"},"modified":"2024-04-09T11:09:32","modified_gmt":"2024-04-09T02:09:32","slug":"nuxt3-plugins","status":"publish","type":"post","link":"https:\/\/m-potion.com\/information\/nuxt3-plugins","title":{"rendered":"Nuxt3 Plugins"},"content":{"rendered":"\n
import\ub294 \uc790\ub3d9\uc73c\ub85c \ub41c\ub2e4.<\/p>\n\n\n\n
export default defineNuxtPlugin((nuxtApp) => {\r\n \/\/ Doing something with nuxtApp\r\n \/\/ console.log(nuxtApp);\r\n return {\r\n provide: {\r\n hello: (msg: string) => `Hello ${msg}!`,\r\n },\r\n };\r\n});\r<\/code><\/pre>\n\n\n\n\n- pages\/index.vue<\/li>\n<\/ul>\n\n\n\n
<script setup>\r\n \/\/ alternatively, you can also use it here\r\n const { $hello } = useNuxtApp();\r\n<\/script>\n\n<template>\n {{ $hello('Good Morning') }}\n<\/template><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"import\ub294 \uc790\ub3d9\uc73c\ub85c \ub41c\ub2e4.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-198","post","type-post","status-publish","format-standard","hentry","category-information"],"yoast_head":"\n
Nuxt3 Plugins - \uace0\uc6b4\uadf8\ubbf8<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\n\t\n\t\n