FoxCode
NuxtScripts usage
Is it possible using NuxtScripts to run a script with a component and imports? eg. https://cdn.jsdelivr.net/npm/@img-comparison-slider/[email protected]/dist/index.esm.js
1 replies
Error but no fail (failOnError: true)
failOnError
is set to true, and it always worked fine, but today when generating the page something went wrong, an error appeared and at the same time it did not throw an error but it is visible in the logs, why? The error was an incorrect syntax in the .md file parsed by nuxt-content.
Logs:
1 replies
How to make only one request when website build
I created plugin like this: https://github.com/nuxt/nuxt.com/blob/main/plugins/stats.ts
but i get
[error] [nitro] [unhandledRejection] [GET] "https://api.github.com/repos/xyz": 429 too many requests
xtimes on yarn generate
.
I changed $fetch('https://api.nuxt.com/stats')
to
3 replies
Accordion in nuxt-content
I want to create accordion component for nuxt-content markdown. I thought it would use NuxtUI Accordion (https://ui.nuxt.com/components/accordion) I would like every H2 to be turned into a title in accordion and the rest of the content to be hidden to make markdown look normal, like here:
Or if it is possible to create multiple slots simultaneously:
But I don't know how to get to the slots in the normal way, I tried:
but
MDCSlot
runs the entire $slots.default, and using the same slot name makes it rendered one at a time
Or if its not worth doing - can I use slots like this?
Accordion.vue: <UAccordion :items="items" />
2 replies
useRoute not working with static website?
Hi, why class "active" is not working with prerender static website? My reproduction code: https://stackblitz.com/edit/github-xwmppm?file=pages%2Findex.vue
Code is like this:
and localhost:3000?active=0 NOT WORKING
and localhost:3000?active=0 WORKING
Why and how to fix that?
1 replies
JavaScript heap out of memory with v3.6.2
I have quite a few .md files using nuxt-content,
yarn generate
usually took a few minutes, but after upgrading to the latest version of nuxt after a while it throws a JavaScript heap out of memory error. Why is nuxt now consuming so much memory, how to check the memory consumption and can it be optimized somehow
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1 replies