Zampa
Explore posts from serversCan't deploy to Cloudflare with 3.12.2
I am still seeing an "unknown internal error" when deploying to Cloudflare Pages using Nuxt 3.12.1 or 3.12.2. Nuxt 3.11.2 deploys fine.
The end of my Cloudflare deployment log looks like this:
There's nothing in the full log that indicates what the internal error is.
Nuxt client built successfully:
Nuxt server built successfully:
I'm not sure what changed in 3.12.x that is causing CF Pages to fail?
21 replies
KPCKevin Powell - Community
•Created by Zampa on 5/28/2024 in #front-end
Modern version of stylelint-config-rational-order ?
I'd like to lean on stylelint to keep my properties in a rational order, but the existing stylelint-config-rational-order is outdated, and does not include any logical properties whatsoever (like margin-inline-start). Is there an up-to-date version of such a config for stylelint that includes all modern (as of 2024) CSS properties?
3 replies
Get dynamic array of page names in Nuxt application
I have a scenario where I'd like to add a middleware that references an array of all the page names that exist at the root of the application (i.e. /user, /faq, /about, etc.).
Rather than hardcode an array of all those names
['user', 'faq', 'about']
, is there some way via Nitro or Nuxt to parse/call to get all the page names that exist within the current Nuxt application?11 replies
KPCKevin Powell - Community
•Created by Zampa on 1/19/2024 in #front-end
How do you set proportional border-widths based on image size?
![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1197955260614967346/image.png)
10 replies
KPCKevin Powell - Community
•Created by Zampa on 11/15/2023 in #front-end
Dynamic Font Size Based On Container & Text Length
![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1174377394539335771/image.png)
7 replies
KPCKevin Powell - Community
•Created by Zampa on 11/7/2023 in #front-end
What are the best practices for the number of srcset items for a dynamically sized image?
![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1171252172835537017/215290904-7b7b4f03-f8f4-4cb0-8028-6640dea2767c.png)
2 replies
Different URLs for client XHR request and SSR XHR requests?
Does anyone know if there is a way to use one URL for all SSR-initiated API XHR requests, and another URL for all browser (client-side) API XHR requests?
I'm noticing that if I have API calls in a server route, it's adding 5x delay to the raw XHR request that happens in the browser.
Example:
Call the API endpoint in the browser: 20-30ms
Nuxt SSR calls the API endpoint from a Nuxt server route: 150-200ms
So presumably there is some way to do this using middleware? A custom wrapper for all API requests (
/api/*
) that would either :
1) use a fully qualified API endpoint URL (https://api.mysite.com/api/...) for all client-side API calls
2) use a relative API endpoint URL ('/api/...
) that references the Nuxt server route /api/[...].ts
for all server-initiated API calls (any time a page is server rendered, and that page requires data from an external API1 replies
Nuxt 3 Custom Loading Component
Is there an equivalent to Nuxt 2's custom
<Loading>
component available in Nuxt 3, with start()
. finish()
, fail()
?
https://nuxtjs.org/docs/features/loading/#using-a-custom-loading-component
I only see https://nuxt.com/docs/api/components/nuxt-loading-indicator in the Nuxt 3 docs, so I was curious if there was any internal initiative to replicate this in Nuxt 3?
The note here leads me to believe it's planned but not implemented: https://nuxt.com/docs/migration/component-options#loading
Perhaps now it would be a quick one to knock out since Nuxt 3.0.0 is out?5 replies