bnason
bnason
Explore posts from servers
NNuxt
Created by bnason on 2/4/2025 in #❓・help
Specify externals in nuxt module
@kapa.ai actually, I need to extend the external array that is used in the nuxt-build-module project that builds modules
8 replies
NNuxt
Created by bnason on 2/3/2025 in #❓・help
Nuxt prepack weird error
Here is my repo, i'm still getting this error and can't for the life of me figure out why. https://github.com/NasonTech/nuxt-fetch-transforms
6 replies
NNuxt
Created by bnason on 1/31/2025 in #❓・help
Get app version
@kapa.ai Does nuxt save the build date anywhere?
9 replies
NNuxt
Created by bnason on 1/26/2025 in #❓・help
Accessing headers when using $fetch
@kapa.ai no i mean when I use $fetch.raw('...', parseResponse: (value) => ({ foo: 'bar' })) I need to get the value returned from parseResponse. Is that in the response._data key?
12 replies
NNuxt
Created by bnason on 1/26/2025 in #❓・help
Accessing headers when using $fetch
@kapa.ai If I pass a function to to parseResponse option, how do I access that data?
12 replies
NNuxt
Created by bnason on 1/21/2025 in #❓・help
"Simpler" date conversion from API without using a special formatter like SuperJSON?
@kapa.ai During what hooks can the nuxt kit addTemplate function be used? I'm using it in nitro:init compiled hook, but the template is not being created.
29 replies
NNuxt
Created by bnason on 1/21/2025 in #❓・help
"Simpler" date conversion from API without using a special formatter like SuperJSON?
@kapa.ai unfortunately, this only works for objects. My response is an array
29 replies
NNuxt
Created by bnason on 1/21/2025 in #❓・help
"Simpler" date conversion from API without using a special formatter like SuperJSON?
@kapa.ai Is there a way to disable Nuxts type conversion from Date to string in the api types?
29 replies
NNuxt
Created by bnason on 1/21/2025 in #❓・help
"Simpler" date conversion from API without using a special formatter like SuperJSON?
@kapa.ai Are there any alternatives to SuperJSON that don't serialzie to a custom format. IE, they serialzie only the actual object.
29 replies
NNuxt
Created by bnason on 1/21/2025 in #❓・help
"Simpler" date conversion from API without using a special formatter like SuperJSON?
@kapa.ai Right, but this requires manually reconstructing a Date object on the client side for every date field there is.
29 replies
NNuxt
Created by bnason on 1/6/2025 in #❓・help
Server side dynamic import
@kapa.ai Is the nitro.externals.inline option deprecated? Can you show me documentation on it
14 replies
NNuxt
Created by bnason on 1/6/2025 in #❓・help
Server side dynamic import
@kapa.ai even using relative paths and the mjs extension, I still get Cannot find module. It looks like it's using the .nuxt/dev/ folder as the base for the relative import. Also, my code would need to be transpiled from its ts code to be mjs
14 replies
NNuxt
Created by bnason on 12/10/2024 in #❓・help
NuxtPage default page
@kapa.ai I ended up using <template v-if="$route.name === 'parent'"> instead of relying on a slug
19 replies
NNuxt
Created by bnason on 12/10/2024 in #❓・help
NuxtPage default page
@kapa.ai that uses an index.vue which I don't want to have to create
19 replies
NNuxt
Created by bnason on 12/10/2024 in #❓・help
NuxtPage default page
@kapa.ai I do not want the default page to also be rendered with the child page
19 replies
NNuxt
Created by bnason on 12/9/2024 in #❓・help
`#shared` types. Failed to resolve extends base type.
I CAN however do import type { BudgetItem } from '#build/imports'
10 replies
NNuxt
Created by bnason on 12/9/2024 in #❓・help
`#shared` types. Failed to resolve extends base type.
If I try that in my script setup, I get Cannot find module '#shared' or its corresponding type declarations.
10 replies
NNuxt
Created by bnason on 12/9/2024 in #❓・help
`#shared` types. Failed to resolve extends base type.
10 replies
NNuxt
Created by bnason on 12/9/2024 in #❓・help
`#shared` types. Failed to resolve extends base type.
10 replies
NNuxt
Created by bnason on 12/9/2024 in #❓・help
`#shared` types. Failed to resolve extends base type.
I'm trying to use the shared types for my component props, for example: This is my ./shared/types/Budget.ts
export interface BudgetItem {
name: string
available: number
}

export interface BudgetCategory {
name: string
items: BudgetItem[]
}

export interface Budget {
name: string
categories: BudgetCategory[]
}
export interface BudgetItem {
name: string
available: number
}

export interface BudgetCategory {
name: string
items: BudgetItem[]
}

export interface Budget {
name: string
categories: BudgetCategory[]
}
This is my ./app/components/Budget/Item.vue
<script setup lang="ts">
interface Props extends BudgetItem {}

defineProps<Props>()
</script>

<template>
<div>
<div>{{ name }}</div>
<div>{{ available }}</div>
</div>
</template>
<script setup lang="ts">
interface Props extends BudgetItem {}

defineProps<Props>()
</script>

<template>
<div>
<div>{{ name }}</div>
<div>{{ available }}</div>
</div>
</template>
10 replies