Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

Set @nuxtjs/i18n options from module

I'm trying to use the latest @nuxtjs/i18n on a module and I'd like it to already set the default i18n options and locales for the project using this module. Is there a way to make it work without declaring locales again in the playground nuxt.config.ts? I created an reproduction here:...

How to use TailwindCSS to style SPA loading template

Is it possible to some how use TailwindCSS classes to style the SPA loading template located in app/spa-loading-template.html? Doesn't seem like the styling is applied even though I have TailwindCSS set up with the module.

How to register global listener for window and add css variable with v-bind at nuxt pages/index

I am migrating my vue3 project to nuxt3, but I found that the main page at pages/index.vue is not the root page which also mounts when any page is active. In my vue project, I use app.vue to add dynamic css variable with v-bind and classes uses them and add global onresize eventHandler to window. So how can I let them run globally in nuxt as they did in my vue project? My vue solution is below. ```javascript onMounted(() => {...

Set global size for all component using app.config.ts

How to set global size for all component using app.config.ts> I tried the followinf it does nto work: ```ts export default defineAppConfig({ ui: {...

which logger works with nuxt?

Im running nuxt with bun and I really couldnt find ANY logger that worked. I just want to efficiently append the logs into a log file but NO logger worked. Not bun.sinkfiles, or winston, or pino, or bunyia. None...

LeafLet Map container is already initialized

Someone help me fix this issue? I tried looking around and I also tried using copilot to fix the issue but no luck. here is the code: ```tsx <template>...

Bun not found in nuxt application?

This is the file im trying to apply on my app - route: utils/logger.vue ```javascript // utils/logger.vue import Bun from 'bun'; ...

App.vue overwritten by layer after adding @nuxt/content@3

Hi, all. When adding @nuxt/content (3) to my app, the app.vue is not used anymore breaking my entire app. Furthermore, the index.vue is also not used and instead the index.vue out of one of my layers is used. This is my package.json: ```json {...

prevent useAsyncData from running in the browser

I am using useAsyncData to see if the user has permission to view the page. I have created a helper function that assists in doing so. It simply returns a promise evaluating to a boolean if the user has permission or not. This logic uses sequelize to make a database request in order to see if the user has permission. I have noticed that useAsyncData also executes on the client. This results in the client calling sequelize functions which relies on nodejs which makes the browser spit an error. 500 buffer not defined I have tried using import.meta to prevent the code from executing on the client but o import.meta variables would work and it would execute in the browser anyway....

Attach data to the inline-middleware

In a particular page route, I must make a API request to my backend. The result from the backend should carry forward to the page to access it. Is this possible? ```html <script setup> const userData = ref() ...

Could not load @nuxtjs/sitemap. Is it installed?

I have started a new fresh project, install @nuxtjs/sitemap add it to nuxt.config.ts modules and then, when I start my application I have this error.
ERROR Cannot start nuxt: Could not load @nuxtjs/sitemap. Is it installed?
ERROR Cannot start nuxt: Could not load @nuxtjs/sitemap. Is it installed?
...

Can someone explain how to run the build command with verbose logging?

I've looked at the docs and no matter what way I structure the build command, I get the same level of logging when building. https://nuxt.com/docs/api/commands/build I've tried the following...

I need a 0 CLS slider for nuxt

Hi, I'm working on a e-commerce website and i need a slider for hero images. I'm currently trying to use @splidejs/vue but its resulting a bad CLS score. I also tested out with nuxt-splide, same thing happens. Can anyone help me about this ? If you encounter such an issue please let me know

Handling multipart/form-data images on backend api

Hi, I want to get form data of image and send it do Cloudinary how should I approach it?

Multi sub domain frontend

Hi, I’m working on a project for a client who wants multiple frontends for different sectors of the business. For ease I will call each a tenant. I plan to use something like strapi to manage content which will generate a static site and be deployed via a webhook. Is there an easy way to dynamically deploy tenants via Cloudflare pages? I did find this:...

How to disable @nuxtjs/color-mode

Best I can tell, @nuxtjs/color-mode is installed as a dependency of Nuxt/UI. I have been struggling to disable this for some time. I have tried different methods, cleared out Application > Storage in my browser, etc., and no matter what I do, I can't seem to figure out whether this is possible and/or what are the correct entries to app.config.ts or nuxt.config.ts. If anyone could help that would be incredible!...

set API_BASE_URL in static site

My landing page project has 3 environments: dev, staging, production, and the API url for all 3 environments are different. How can my static site use an environment variable for this?

Actual files not showing with Content v3

I have 2 Markdown files in /content/jobs, and I'm just trying to show them in a list in a page, but I can't figure out how to do this. Everything I've tried has either errored somewhere, or only showed one result, with a title of Jobs and a path of /jobs. Here's my current code, copied from the docs and slightly modified: pages/jobs/index.vue:...
No description

checking routes with i18n - report usage

Hello, Does anyone have a method to verify all the routes for pages that use defineI18nRoute and could generate something like this: ```...

Nuxt Sitemap Issues

Nuxt and nuxt sitemap versions: └── @nuxtjs/[email protected] └── [email protected] Error:...