Renato L.
Renato L.
Explore posts from servers
NNuxt
Created by Renato L. on 8/26/2024 in #❓・help
Will Nuxt Auth Utils work with Serverless?
I'm not much of a backend developer, so I'm not 100% sure how authentication works all the time. But I'm wondering if the nuxt auth utils would work in a serverless plataform like Netlifly or Firebase Functions. Especially since the execution context might not be the same between function calls. I feel that it should work because they will always share the same SESSION_PASSWORD
2 replies
KPCKevin Powell - Community
Created by Renato L. on 6/18/2023 in #front-end
Container Size Queries and Firefox version
Hello everyone, I've been putting off learning Size Queries due to the fact that Firefox support was missing. But Firefox supports it from version 110 onwards. I'm a Linux user, so I'm always updating Firefox using my package manager, so I know I have the latest version. But what about Windows users? 110 was released in February, can I be sure that users are using at least version 110? Does Firefox update automatically on windows like Chrome? In general, how long till you wait until you consider it's safe to use a feature? Specially for features that might break the whole site when missing (not stuff like text-balance: wrap)
8 replies
NNuxt
Created by Renato L. on 5/2/2023 in #❓・help
Creating module composable with module starter
Hello everyone. I'm trying to learn how to create a module. According to the documentation recipe, it can be (I only changed the name of the composable):
import { defineNuxtModule, addImports, createResolver } from '@nuxt/kit';

export default defineNuxtModule({
setup(options, nuxt) {
const resolver = createResolver(import.meta.url);
addImports({
name: 'useCMS',
as: 'useCMS',
from: resolver.resolve('runtime/composables/useCMS'),
});
},
});
import { defineNuxtModule, addImports, createResolver } from '@nuxt/kit';

export default defineNuxtModule({
setup(options, nuxt) {
const resolver = createResolver(import.meta.url);
addImports({
name: 'useCMS',
as: 'useCMS',
from: resolver.resolve('runtime/composables/useCMS'),
});
},
});
The docs do not provide a composable as an example, but I would assume it is the same as any nuxt composable. So this one should work: runtime/composables/useCMS.ts
export function useCMS() {
return {
title: 'Title of the website',
navBar: false,
columns: 5,
};
}
export function useCMS() {
return {
title: 'Title of the website',
navBar: false,
columns: 5,
};
}
In the play ground, I changed app.vue to the following:
<template>
<div>
{{ title }}
</div>
</template>

<script setup>
const { title } = useCMS();
</script>
<template>
<div>
{{ title }}
</div>
</template>

<script setup>
const { title } = useCMS();
</script>
But I get an error: 500 useCMS is not defined I created a new nuxt project and the same useCMS composable worked. I believe this might be a problem with the playground, even when removing the module from the playground config, and writing useCMS in the composable folder I get the same error. Here is a stackblitz reproduction of the issue: https://stackblitz.com/edit/github-budsam?file=src/module.ts Is this a bug or am I doing something wrong?
5 replies