Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

Understanding useSession behavior in Nuxt with Better-Auth and NuxtUI

I'm using Better-Auth for authentication and ran into some confusion while trying to implement a simple feature: showing a Login button in the menu when the user is not authenticated, and Sign Out when they are. I'm also using NuxtUI for the UI components. After a lot of trial and error, I got it working with the code below, but I got questions: 1. Why does using await to useSession() fix it?...

Cant acces nested page with i18n and custom route name

Hey everyone, I'm running into a strange routing issue in my Nuxt application and could really use some help. The Problem:...

Get DOM-Element from Nuxt-UI elements

For example, i have <UInput ref='refInput'/> and wich type has refInput = ref<>(null)?

nuxt ui icons local bundle do i also need to install the icon library locally?

So with the nuxt ui icons im using " icon: { clientBundle: { // scan all components in the project and include icons for fast load speeds scan: true, },...

Client Lazy Data Fetching

What is the difference between const { status, data: posts } = await useFetch('/api/posts', { lazy: true }) and useFetch without await?...

How to use Lazy component with render function

I'm trying to Lazy Hydrate components with h ```js import { LazyComponent...

hub

Nuxt Hub how I can use crypto.createSign as I get "[unenv] crypto.createSign is not implemented yet!" 😐

custom `name` parameter for Nitro `defineCachedEventHandler()`

I want to use the current language as a parameter sor my API call. Obviously, I want my cache strategy to follow these different languages possibilities: ```js import { fetchSuggestions } from '../utils/suggestions' ...

code being executed when running npm run build

maybe this is a silly question, but when I run the npm run build command I see that the code in my nitro plugins is being executed. Is this expected? Where can I find more context about this behaviour? :pepethanks:

usetoast callback when toast clears

When using useToast and creating a dynamic toast with toast.add is it possible to have a callback that triggers a function when the dynamically created toast clears?

Deploying to Cloudflare - cant see /manifest.json

Ive got a static site that im trying to deploy, ive got ssr: false because were going on cloudflare, ive got my manifest.json in root public directory. it works locally. cf is built with npm run generate and told to serve from dist - but i get a 404 on the manifest. reasonably simple project:...

tailwind

/layers not apply tailwind v4?

auth for specific routes

I have pages like /account/ and /admin/ i want to protect so i made a middleware ```'/account/': { meta: { requiredRole: 'user', middleware: ['auth'] }, }, '/admin/': { meta: { requiredRole: 'admin', middleware: ['auth'] },...

<ClientOnly> vs .client.vue

Yo Kapa Difference between naming a component something.client.vue and wrapping it into <ClientOnly> in the parent...

Redirect 404 pages from a middleware

Hi there, i'm currently working on my company's new website with Nuxt 3.17. This new site will be AB tested and some of the old site's pages won't be implemented from the start in the new version. I need to detect routes that are 404 in the new website and to redirect these to the equivalent page on the old website... ...

Size of modals

How can i define the width of the modal component?

Important! Can Sanity documents be used to generate and manage Nuxt Pages?

I have successfully accomplished this feat…sort of but I still see some issues that I wonder if anyone knows how to get over this. The pages are sanity documents with a pagePath or slug. For instance “/”, ”/about” I have a […slug] page which is assigned a sanity-page-middleware ...

webpack 打包

如何修改成 webpack 打包的模式?

Nuxt UI Pro - Lemonsqueezy issue preventing me from buying

Hi, trying to buy Nuxt UI Pro, but i keep getting a 500 error on the lemonsqueezy checkout page. I know this is not a "nuxt" issue, but hoping i can capture a core member's attention to look into the issue. Blocked from deploying a site until i buy unfortunately. Can share the payload and request details in a DM. ...

Support for Versioning in Generated Output

We have apps that are client side only, served from S3, and I was thinking it would be nice if I could put everything generated into a v-1.2.3/ folder, but keep index.html in the root with the version released that points to this subfolder (favicon and robots would probably be a few that need to stay in the root). I can't seem to find a way to move everything but index. I suppose I could script it, but is there an easier way to make this happen?