Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

Cache Policy

Heya, I am trying to set a proper cache policy for images in /public (and images generated by the nuxtimg sizes tag) and stuff in _nuxt, how would I do that?

cannot import 'useApollo' composable from another composable

in my nuxt app, i decided to use @nuxtjs/apollo as the apollo client because it sets up things for me. to make usage of it more conveneint, i made a composable useGlobalApollo which exposes the default client. ```ts // composables/useGlobalApollo.ts export const useGlobalApollo = () => {...

Help with Tailwind InteliSense in VSCode IDE

I am using VSCode with Tailwind CSS InteliSense extension. I am not getting any intelisense for tailwind in this project. in my other projects the intelisense works just fine (note they all use the nuxt/tailwind module) I followed this setup guide: https://tailwindcss.com/docs/installation/framework-guides/nuxt ...

in development comments are fetching correctly, on production theres no fetch

const fetchComments = async () => { try { const { data } = await useAsyncData( 'comments', () => $fetch('/api/v1/comments', {...

Component edit color

Hello, I'm looking for a way to style nuxt/ui components. For example, I'm using UNavigationMenu and I have this rendering (see screen), I'd like to change the colors of these elements. From what I've seen, I have to do this in app.config.ts, it looks laborious but maybe I'm wrong (that's why I need your help). Thanks in advance,...
No description

Future-proof way to disable auto-imports of ~/shared?

Hi there, I'm writing new code in Nuxt 3, and I noticed this note on https://nuxt.com/docs/guide/directory-structure/shared#auto-imports:
Auto-imports are not enabled by default in Nuxt v3 to prevent breaking changes in existing projects.To use these auto-imported utils and types, you must first set future.compatibilityVersion: 4 in your nuxt.config.ts.
Auto-imports are not enabled by default in Nuxt v3 to prevent breaking changes in existing projects.To use these auto-imported utils and types, you must first set future.compatibilityVersion: 4 in your nuxt.config.ts.
...

supabase signup pass custom data

async function onSubmit(payload: FormSubmitEvent<Schema>) { try { const { error } = await supabase.auth.signUp({ email: payload.data.email, password: payload.data.password...

Content change content programatically

I'm trying to add style tag to the h1 of my posts: I tried the {style="... that didn't work I also tried in nuxt config: ```ts content: { build: {...

Can't seem to deploy because of size limits in Vercel and Netlify

I'm not sure what I'm doing wrong but when I try to deploy to Vercel (or Netlify), my build always fails because of the 250MB size limit. I'm not sure why it reaches this amount. When I build locally the size is 69.9MB. It's probably because of the node_modules which seems to be 114MB (see image), I'm not sure if this is normal, I have a quite a few packages that I use but not excessive, it's mostly Prisma and Sharp that take up the space. I tried to remove some dependencies but it didn't work....
No description

Using NuxtContenet With NuxtImage On a Static Site

Hi there, I am struggling to get NuxtImage to work with my usage of NuxtContent. Basically, I have a directory of json files which is being processed by NuxtContent. I am using queryContent to fetch the contents of those json files so I can loop over them on my page. One of the properties on my content schema is called image, which is just the path the image that needs to get used for that item. ...

Headers aren't available in asyncData

Hello. I have an old project on Nuxt 2. It works as SPA. I have plagin
{...

content i18n

Nuxt Content vs i18n! Hola amigos! 🙂 I am on the nuxt content3 and I want to pull a document from dir content/es at the url '/es/docs' when I change locale to 'es'. url for 'en' is simply '/docs', but how do i pull the right document for the locale?...

Advice on authentication guards with server middleware

Hi everyone, I was hoping to get some advice on how to handle custom auth within Nuxt. (It's worth noting we're deliberately not using a package, because we have a lot of auth code already that is custom and being re-used for this app) Right now, I have four pieces set up: - Various server auth endpoints to login, set session cookie, verify session...

Problems with Nuxt 3.16.1

Hi All, So, I'm having a couple of issues with the updated Nuxt version. 1. Breakage in nuxt.config.ts configuration options (still tracking down, will update later)...

useFetch works perfectly on dev enviroment, on productions fails on pre-hydration

const fetchComments = async () => { try { const { data } = await useFetch('/api/v1/comments', { method: 'GET', params: {...
No description

useSwitchLocalePath

How to use useSwitchLocalePath , want to switch locale without path, I want to redirect to home page

Reactive Vuex store getter in plugin provide

Migrating a Nuxt 2 project so excuse the strange behaviour. Is there a way to make $app reactive here? ```...

Nuxt Module - Tailwind V4

Hey ! I'm trying to use Tailwind in a Nuxt module, in the part where I installed the module In the project where I installed my module, I can use Tailwind, but inside the module itself, I can't. Could you please tell me how to make it work?...
No description

nuxi typecheck watch

Hey there ! Is there a way to run nuxi typecheck in watch mode ?