Huperniketes
Huperniketes
Explore posts from servers
TTCTheo's Typesafe Cult
Created by Huperniketes on 6/13/2024 in #questions
How do I map next.config.js code samples in the Next docs to T3's implementation?
Next shows examples using module.exports like
module.exports = {
async headers() {
return [
{
source: '/about',
headers: [
{
key: 'x-custom-header',
value: 'my custom header value',
},
{
key: 'x-another-custom-header',
value: 'my other custom header value',
},
],
},
]
},
}
module.exports = {
async headers() {
return [
{
source: '/about',
headers: [
{
key: 'x-custom-header',
value: 'my custom header value',
},
{
key: 'x-another-custom-header',
value: 'my other custom header value',
},
],
},
]
},
}
but the config file generated by the T3 cli has:
const config = {};

export default config;
const config = {};

export default config;
How do I translate the code presented by the Next docs to the implementation used in T3?
7 replies
TTCTheo's Typesafe Cult
Created by Huperniketes on 5/13/2024 in #questions
t3 workflow?
I'm in the dark on the t3 infrastructure and how it affects the development process, and I don't think it's meta enough for #ct3a-meta. I'm trying to add an email provider using Next-Auth. I've been making changes to its files (eg, ./node_modules/next-auth/providers/email.js), but they don't seem to make it to the app. The Next dev environment's HMR doesn't hot-reload packages like Next-Auth, correct? I have to restart the app for changes in them to take effect? No logging output shows up in the server output (terminal). Where should they appear, and what would prevent them? The email provider needs the nodemailer package, but it doesn't appear to get imported. Is it supposed to be added in the project's root package, or Next-Auth's?
6 replies
TTCTheo's Typesafe Cult
Created by Huperniketes on 7/5/2023 in #questions
how can I invoke a trpc call inside a nested function?
I know it isn't directly possible. But is there a workaround?
14 replies