Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

Development mode component styles generate <style> instead of <link rel="stylesheet">

Is it possible to configure Nuxt in development mode to generate <style> tags for component CSS instead of a <link> ? I see this behavior in the production build, however, the development build always generates <link> tags for global CSS files and SFC styles.
<link rel="stylesheet" href="/_nuxt/assets/css/main.css" crossorigin>
<link rel="stylesheet" href="/_nuxt/pages/my/page/my-component.vue?vue&type=style&index=0&lang.css" crossorigin>
<link rel="stylesheet" href="/_nuxt/assets/css/main.css" crossorigin>
<link rel="stylesheet" href="/_nuxt/pages/my/page/my-component.vue?vue&type=style&index=0&lang.css" crossorigin>
...

navigateTo inside useAsyncData

I have this request in my SPA component: ```js const { data: product } = await useAsyncData('product-id', async () => { try { const response = await getProductById(1)...

nuxt ui toaster location won't change

```export default defineAppConfig({ toaster: { position: 'bottom-left', expand: true, duration: 5000,...

Render multiple component-previews as "islands" within a non-nuxt app

I want to render multiple "islands" of nuxt-components in a non-nuxt page, for preview purposes. For that I want to keep using the nuxt app, such that its components are used and component auto-loading works as usual. Thus, I want to re-use the nuxt bundlle and initialize the nuxt app manually on the client-side. I figured the regular entry file auto-initializes nuxt and mounts it to the root element #__nuxt. That's not suiting in my case, since I need multiple instances of components, .e.g. rendered via some custom h() call. Any ideas on how to do prevent nuxt to auto-mount immediately after loading?...

I want change background color NavigationMenu

I want to change the background color of Navigationmenu, but don't know how to do it. Help me, thanks
No description

"500 OK" when using routeRules to external backend

``` Error fetching author data: FetchError: [GET] "/api/mc-services/litematica/profile/Molforte?lang=ru": 500 OK at async $fetchRaw2 (file:///www/website/node/server/chunks/nitro/nitro.mjs:3921:14) at async $fetch2 (file:///www/website/node/server/chunks/nitro/nitro.mjs:3926:15) at async setup (file:///www/website/node/server/chunks/build/index-D8Vo9RTZ.mjs:241:22) {...

How can I load a 3rd party script widget?

The documentation I'm following says that I need to add the following code: ``` <form> <script...

$fetch dns that resolves to ipv6

Got this composable that has my expressjs backend on the baseURL ```ts export const useApi = () => { const config = useRuntimeConfig() console.log(config.public.apiBase)...

Watching files outside app/ directory

Hi! I tried configuring nuxt & vite to correctly hot reload etc. for my custom directory in root (my-content/) how to configure it properly? I spend a lot of time to configure it, but I cannot do it

Multi tenantcy

I'm building a multi-tenant Nuxt app and want to enforce domain-based access rules for routes. Here's the setup I'm aiming for: app.product.com: should only serve /login, /register, and /password-reset. *.product.com (e.g., customer-1.product.com): should serve all main app functionality, but not allow access to /login, /register, etc....

Dockerfile for a nuxt module

Does anyone have an example Dockerfile that would work for a repo that contains a nuxt module at its root? I want to build the module, and then expose the .playground.

I want to deploy my project on Nuxthub

auth: { isEnabled: true, originEnvKey: "NUXT_AUTH_ORIGIN", baseURL: process.env.NUXT_BASE_URL, provider: {...

Vue-virtual-controller scrollToBottom() not working in nuxt?

Hi, I setup vue virtual controller and setup the plugin for nuxt which works. However I’m unable to get the scrollToBottom working so I’m wondering if someone here is using it with scroll to bottom working? I’m using the dynamic scroller if that makes a difference. i saw on their github someone posted a comment saying scrolltobottom isn't working on nuxt a year ago so hopefully there's a fix now?

Scroll flickering on page change

I'm new to Nuxt and currently trying to migrate a small website from Vite. I noticed a difference in page change behavior with Nuxt. Once I'm clicking on a NuxtLink, there's a small delay between the scrollToTop made by vue-router and the load of the new page, which creates a flickering effect. It happens even on pages that doesn't contain asynchronous calls. Also, note that I'm using a <Transition> markup to encapsulate the <NextPage>, the main reason is that I need an animation on website load and this is the only way to achieve that. It seems to partially fix the issue if I remove the animation.. ...

Dynamic base href for one app and multiples domains path

Hi. I'm researching frameworks that meet my requirements. And the most important one is the ability to handle dynamic base href....

Popup form that changes route and can be opened from anywhere in page

In my Nuxt application, I have a navbar and there I have a settings option. The idea here is that the option will change the route to /settings and this will open a popup form (UModal) and display it over the page that the user had open, it doesn't matter what the previous page was, it will show over it. I have a pages/settings/index.vue that looks like this: ```<script>...
No description

nuxt ui dropdownmenu how to make clicking an option do something

hi im using nuxt ui dropdownmenu and i display some options inside like delete message etc how do i make it when i click that delete message that something actually happens. i tried a few methods but i's not firing anything for me

headers duplicated issue

Hello, nuxt generate these headers: x-content-type-options: nosniff X-Content-Type-Options: nosniff And then I got these headers. some browsers are not happy with that. there's a way to fix that ? Thanks!...
No description

getCachedData Not Working

Hi could some give me help getCachedData stopped working and i also disabled purgeCachedData and still doesnt work ``` const getCurvasCarga = async (cpe: string, data_inicio: string, data_fim: string) => { const token = await getAccessTokenSilently();...