Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

Overriding the default envName

How do I override the default value of envName from
process.env.NODE_ENV
process.env.NODE_ENV
to a custom environment variable?

Store usage/relevance with Nuxt 3

When working on my various Vue 2 projects (around 5 SPA web applications) I found Vuex incredibly useful. Namely, it provided a single place for my logic around interfacing with my .NET API, as well helping share state between components. However, as I've started writing more in Vue 3, especially given nuxt composables/plugins like $fetch, useFetch, useAsyncData, callOnce, useState, etc. I've found myself struggling to justify this default of 'relates to api data, put it in the store'. For instance, I'll have a card that needs some async data. If I load it in the card, I have access to the returns/capabilities of useFetch like watch, error, loading, etc. If i wanted that call in the store, i would need to expose each of these. Furthermore, my stores become a bunch of inline composables related to components....

Hydration Error

Hello Nuxt Gang. I have run into some trouble. I have a project I am trying to work on and I have been experiencing hydration errors recently. This is the error I am getting: ``` 500...

Ignore "type" for variables enum after build of module

I created simple enum: ``` file: module.ts export enum test {...

eslint and antfu config

Hey, I have a fresh new nuxt 3 project. I added a few modules, devtools, nuxt fontc, image icons and eslint. I also added antfu/eslint-config and i want o use this lint and stylistic. the es lint was working fine until i installed antfu/eslint-config and tried to use it. my dependencies: ` "dependencies": { "nuxt": "^3.15.4", "vue": "latest",...

Hydration and caching issues on universal rendering page

I have three issues on a page that is using SSR / universal rendering... 1. There are hydration errors — I'm guessing this is something I've misconfigured in the client-side code. Page code: https://github.com/seancdavis/qr-polls/blob/main/pages/polls/%5Bid%5D.vue 2. I'm curious why the initial response is empty. The docs noted that universal rendering had the benefit of SEO/prerendering + hydration, but maybe I'm thinking about this wrong?...

Do I need to rerun the build command for `runtimeConfig` items to reflect changes?

I have, for example: ``` runtimeConfig: { databaseUrl: process.env.DATABASE_URL ?? '',...

Full static still calls /api/

I have a full static setup, i have a module that ensures all routes i want it to prerender at generate as a static file is there. I still find that if my app is deployed it calls and api route even though i prerendered it. i tried to download the zipped folder from netlify to ensure my route is there and it is. ...
No description

useSeoMeta with i18n

Hello, I use useSeoMeta with i18n I have two languages : fr and en. ...

Exposed values in a queryCollection

Hi, I'm trying to output my Front Matter data in a .vue file, but something seems off. I'm wondering if I might have missed something that explains this behavior. Example markdown file: ```yaml ---...

dynamic layout

Hi there! I have an issue with my dynamic layout, whenever I change it from global middleware, it resets to empty string again and goes to infinite redirection. Any help would be appreciated!
No description

Custom Routing in Nuxt 3 with Nuxt/content 3

I've been grappling with implementing custom routing in a Nuxt3 project for the past two days without success. The current website is built on WordPress and features dynamic URLs such as: /parent-page-slug (10 pages) /traing-page-slug (6) /article-slug (200+) /testimonial-slug (50+)...

Error : prisma/client/index-browser

Hallo everyone, i got an error while build & preview my project, here is the error code and screenshot. Error:...
Preview

Prerender with I18n differentDomain and strategy: prefix_except_default

Let's say we have 3 locales: test.com, test.com/de, test.nl. As you may see we do have 2 homepages with the same route: / but within a different domain. Is it possible to prerender both pages?

Dark mode with neutral color seems to be broken in the UI docs

I just entered the site and had the preference to see the docs with neutral colors and in dark mode and now seems that the last update on the docs brokes the dark mode with neutral color. I tested it in multiple browsers and looks the same.

API Keys

Asked this question before, but its still not quite clear for me. I'm trying to implement API keys into my server part, the frontend does requests to the backend API. I would like for the API key to not be exposed to the frontend. What are my options here? The client wants data to show on the frontend for everyone, but for people to use the API they should receive a key. For me it kind of sounds like we're solving exactly nothing. Please let me know your thoughts...

Nuxt deployment on Digital Ocean API calls EXTREMELY slow

Hey guys so I just deployed my app to Digital Ocean following the official documentation and it is painfully slow on the api folder calls. I have also confirmed that it is not even using 30% of the available cpu/memory, it is something related to the app itself. Can someone please help me?...

nuxt/fonts + tailwind 4 + google fonts Error: Unknown font format

hello, i am trying to use a google font in my project. the font is declared using the new tailwind config in css token this is wha the nuxt/fonts documentation say about how to setup it in this case fonts: {...

We're deploying to Vercel but it appears new deployments do not propagate to clients

We're deploying to Vercel but it appears new deployments do not propagate to clients until they hard reload the page. What might be the cause of this? Is this a Vercel issue or some nuxt config I need to use?

What is the easiest way to preview my Nuxt 3 site locally with HTTPS enabled?

I've just finished running bun run build and bun run preview. I'm wondering if there is a Nuxt module that can help me preview my site locally with HTTPS enabled.