Omnislash
Omnislash
NNuxt
Created by Omnislash on 2/20/2025 in #❓・help
Content-Security-Policy with nuxt scripts gtm
Looks like my browser is not up to date my bad for using something a bit exotic ^^"
15 replies
NNuxt
Created by Omnislash on 2/20/2025 in #❓・help
Content-Security-Policy with nuxt scripts gtm
@kapa.ai I tried the solution 1, but it's breaking a lot of other things Do you have a standard CSP for nuxt 3 that doesn't break anything and allows gtm and analytics ?
15 replies
NNuxt
Created by Omnislash on 2/20/2025 in #❓・help
Content-Security-Policy with nuxt scripts gtm
@kapa.ai how and where can I modify my conbtent security policy to add the GTM script
15 replies
NNuxt
Created by konsav on 2/19/2025 in #❓・help
Switching from vue-i18n to @nuxtjs/i18n — Folder Structure & Dynamic Imports Issue
14 replies
NNuxt
Created by konsav on 2/19/2025 in #❓・help
Switching from vue-i18n to @nuxtjs/i18n — Folder Structure & Dynamic Imports Issue
For some reason datetimeFormats doesn't work, but the rest is peachy
14 replies
NNuxt
Created by konsav on 2/19/2025 in #❓・help
Switching from vue-i18n to @nuxtjs/i18n — Folder Structure & Dynamic Imports Issue
I did it that way, got the inspiration on stackoverflow nuxt.config
import i18nConfig from './i18n.config'

export default defineNuxtConfig({
// blablabla
i18n: i18nConfig,
// blablabla
)}
import i18nConfig from './i18n.config'

export default defineNuxtConfig({
// blablabla
i18n: i18nConfig,
// blablabla
)}
i18n.config
import { languagesAvailable } from './utils/languages'

const translations = ['footer', 'home', 'article'] as const

const locales = languagesAvailable.map(lang => ({
code: lang,
files: translations.map(tra => `${lang}/${tra}.json`, )
}))

export default {
// experimental: {
// localeDetector: 'localDetector.ts'
// },
legacy: false,
locales,
langDir: 'translations',
fallbackLocale: 'fr' satisfies LanguageCode,
strategy: 'prefix',
datetimeFormats: {
en: {
short: {
year: 'numeric',
month: 'short',
day: 'numeric',
}
},
fr: {
short: {
year: 'numeric',
month: 'short',
day: '2-digit',
}
}
},
} as const
import { languagesAvailable } from './utils/languages'

const translations = ['footer', 'home', 'article'] as const

const locales = languagesAvailable.map(lang => ({
code: lang,
files: translations.map(tra => `${lang}/${tra}.json`, )
}))

export default {
// experimental: {
// localeDetector: 'localDetector.ts'
// },
legacy: false,
locales,
langDir: 'translations',
fallbackLocale: 'fr' satisfies LanguageCode,
strategy: 'prefix',
datetimeFormats: {
en: {
short: {
year: 'numeric',
month: 'short',
day: 'numeric',
}
},
fr: {
short: {
year: 'numeric',
month: 'short',
day: '2-digit',
}
}
},
} as const
I have a languageAvailables file in /utils because I use it here and there
export const languagesAvailable = ['fr', 'en'] as const
export type LanguageCode = typeof languagesAvailable[number]
export const languagesAvailable = ['fr', 'en'] as const
export type LanguageCode = typeof languagesAvailable[number]
14 replies
NNuxt
Created by BobLamarley on 2/18/2025 in #❓・help
Layout and Pages
Depending on how much the layout changes, I wouldn't bother much and do the same thing as you did in your page. Like, displaying a different menu depending on isAuthenticated
6 replies
NNuxt
Created by Rudo Kemper on 2/17/2025 in #❓・help
Does anyone have a great eslint+typescript Nuxt 3 setup?
I forgot why, but I wanted high control and the stylistic options weren't working how I was expecting it. Did it that way, and works great now : https://ptb.discord.com/channels/473401852243869706/1293909163587534930/1313413917158015036
10 replies
NNuxt
Created by Omnislash on 2/14/2025 in #❓・help
useScriptGoogleTagManager no dataLayer push function
It was a version issue, weird, I basically installed it 2 days ago while reading the documentation Anyway it works fine now ^^
11 replies
NNuxt
Created by Omnislash on 2/14/2025 in #❓・help
useScriptGoogleTagManager no dataLayer push function
@kapa.ai Hello, I'm following this : https://scripts.nuxt.com/scripts/tracking/google-tag-manager When I try this :
const { proxy } = useScriptGoogleTagManager({
id: 'YOUR_ID' // id is only needed if you haven't configured globally
})
// example
proxy.dataLayer.push({ event: 'conversion', value: 1 })
const { proxy } = useScriptGoogleTagManager({
id: 'YOUR_ID' // id is only needed if you haven't configured globally
})
// example
proxy.dataLayer.push({ event: 'conversion', value: 1 })
dataLayer doesn't exist, it's in proxy.google_tag_manager.dataLayer instead, and it's different. If I try to call push from it : Property 'push' does not exist on type 'AsAsyncFunctionValues<{ gtmDom: boolean; gtmLoad: boolean; subscribers: number; }>' How to get the dataLayer ? Thanks 🙂
11 replies
NNuxt
Created by Omnislash on 2/14/2025 in #❓・help
useScriptGoogleTagManager no dataLayer push function
no @kapa.ai anymore :x ?
11 replies
NNuxt
Created by Omnislash on 2/12/2025 in #❓・help
useScriptGoogleTagManager returns void
solved
27 replies
NNuxt
Created by Omnislash on 2/12/2025 in #❓・help
useScriptGoogleTagManager returns void
omfg I forgot to add the module, I don't know why in my mind the npx nuxi@latest module add scripts would do it
27 replies
NNuxt
Created by Omnislash on 2/12/2025 in #❓・help
useScriptGoogleTagManager returns void
@kapa.ai removing .nuxt and relaunching npx nuxi prepare didn't solve it
27 replies
NNuxt
Created by Omnislash on 2/12/2025 in #❓・help
useScriptGoogleTagManager returns void
@Kilisei removing .nuxt and relaunching npx nuxi prepare didn't solve it oops, sorry, missed kapa ^^"
27 replies
NNuxt
Created by Omnislash on 2/12/2025 in #❓・help
useScriptGoogleTagManager returns void
@kapa.ai if I try nuxi prepare, it says : PS D:\Projects\tm-website> nuxi prepare nuxi : The term 'nuxi' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. I know it's the right folder
27 replies
NNuxt
Created by Omnislash on 2/12/2025 in #❓・help
useScriptGoogleTagManager returns void
@kapa.ai I tried restarting visual studio code, still nothing
27 replies
NNuxt
Created by Omnislash on 2/12/2025 in #❓・help
useScriptGoogleTagManager returns void
@kapa.ai I installed scripts with : npx nuxi@latest module add scripts I just added import { useScriptGoogleTagManager } from '#imports' at the top of my file still the same problem : Property 'proxy' does not exist on type 'void'.ts(2339)
27 replies
NNuxt
Created by Eric on 2/11/2025 in #❓・help
read stream from event twice
sorry I use adonis as a backend, I do use the chunks on the file part but it treats the data for me on the parameters part ^^"
18 replies
NNuxt
Created by Eric on 2/11/2025 in #❓・help
read stream from event twice
For exemple if it's an image you want to store on a S3, you could : - Use somthing like putstream to put it chunk by chunk (and cancel it if too large or something) - concat the chunks and upload it in one go with a basic put
18 replies