Wrapping useToast
I'm looking for wrapping useToast, I need some types like ToastInterface and NotificationColor but I can't seem to be able to find them
How do I import useToast types in my plugin or composable ?
Thanks 🙂...
Supabase auth redirect rules
I have a Nuxt app with an API route defined at
/server/api/scan/[club].ts
, but accessing it will redirect the user to the /login
route. This is my Nuxt config
```ts
supabase: {
redirectOptions: {...Slow Development VSCode
Hello there ! Anyone is facing a slow Nuxt dev mode in Vscode ? I don't know if it's Volar ? VSCode or Nuxt
The test ignores useNuxtApp
Hello, everyone!
I need help with unit-testing.
My component LocationSelection.vue:
```
<template>...
Unit Test OnMounted
My component:
```typescript
import { debounce, upperCase } from 'lodash'
import type { ILocationCitySuggestItem, ILocationCitySuggests } from '~/types/location'
import { useLocationStore } from '~/store/location'...
hydration mismatch while using nested layout
reproduction:
https://stackblitz.com/edit/stackblitz-starters-dlgnafxg?file=README.md
in nested layout, created by nesting
<NuxtPage />
using useFetch
will result in hydratation mismatch because useId() resolves differently on server and client.
(may apply to all async bariers, didn't tested)...
Nuxt with PM2 and TypeScript
I have a project with a Nuxt application and PM2. For the PM2 application we have a file named worker.cjs. I turned this into a TypeScript file, so that I can leverage the types we have from our Supabase database. I am trying to have it compiled when Nuxt builds, so I've added an extra tsconfig as composite. Does somebody have experience with this?
```
TS6305: Output file '/dist/workers/worker.d.ts' has not been built from source file '/workers/worker.ts'.
The file is in the program because:...
How do I disable Nuxt 4 from automatically extending Nuxt apps inside `layers/` directory?
How do I disable Nuxt 4 from automatically extending Nuxt apps inside
layers/
directory?How can I expose my local dev server to other devices in the same network?
I am not able to access the local dev version on other devices.
What causes"#build/components" from "pages/index.vue". Does the file exist ?
I am trying to reference the file in nuxt however I get this error
```js
<script setup lang="ts">...
Change URL in unit-test with useRoute
```typescript
import {describe, it, expect,} from 'vitest';
import { mockNuxtImport, mountSuspended } from '@nuxt/test-utils/runtime';
import LayoutLogo from '../LayoutLogo.vue';
import {useLayoutStore} from "~/store/layout";...
useRoute and mountSuspended - test is freezing
My test:
```typescript
import { describe, it, expect, } from 'vitest';
import { mockNuxtImport, mountSuspended } from '@nuxt/test-utils/runtime';
import { flushPromises } from '@vue/test-utils';...
Trying to get Nuxt Image ipx caching to work
It's taking a long time to optimise images on the server (default configuration rather than SSG). And the second time I access the image it's no quicker, which makes me think it's not using the cache but rather regenerating the image each time.
The image source is _ipx/... so I know the optimizer is working, but how can I test whether the cache is being used?
(I've added in the
maxAge
as suggested in this post, but it doesn't seem to have made a difference)...
I18n Route translation
Hi, I have a question about route translation, I am working with a multilangual team and want to keep my folder structure and pages/ folder in english. But the main website will be in german only. Now I want to translate my routes to German but it doesnt really work via i18n, are there any other solutions:
My folder structure:
```...
Old version keep cached after deployment
When I deploy my nuxtjs application, my users' browsers cache the old version.
I build a docker image via a github CI/CD and then redeploy the Jelastic docker container behind a nginx loadbalancer.
Should I also restart the nginx loadbalancer?...
Where to handle 404 in useAsyncData?
Hey folks, I have a simple composable that uses fetch to get some authorized data:
```
export async function useApiFetch(request, opts) {
const apiToken = useCookie('api_cookie')
...