konsav
konsav
NNuxt
Created by konsav on 2/19/2025 in #❓・help
Switching from vue-i18n to @nuxtjs/i18n — Folder Structure & Dynamic Imports Issue
@Omnislash Thank you for your response. Could you send me the post from stackoverflow?
14 replies
NNuxt
Created by konsav on 2/19/2025 in #❓・help
Switching from vue-i18n to @nuxtjs/i18n — Folder Structure & Dynamic Imports Issue
@kapa.ai just to clarify, my setup isn’t as simple as having two files per language — I actually have multiple translation files for each page of the app, organized in a folder structure like this:
/lang

├── /GR
│ ├── /Common
│ │ └── Footer.json
│ ├── /HomePage
│ └── text.json
├── /EN
├── /Common
│ └── Footer.json
├── /HomePage
└── test.json
/lang

├── /GR
│ ├── /Common
│ │ └── Footer.json
│ ├── /HomePage
│ └── text.json
├── /EN
├── /Common
│ └── Footer.json
├── /HomePage
└── test.json
So instead of just el.ts and en.ts, I need to dynamically load all these files while keeping the folder structure intact.
14 replies
NNuxt
Created by konsav on 2/6/2025 in #❓・help
NuxtImg from assets folder
@Kal thank you for your response. I use the Vite base because I have the same configuration previously. Concerning your advice, I have the images inside assets folder and not in public folder. This code now run on dev but not when i am running production. Its appear src="data:image/jpeg;base64,/9j/4AAQSkZ... modules: ['@nuxt/image'], image: { provider: "ipx", domains: [cdnMinUrl], ipx: { baseURL: ${baseUrl}_ipx, }, dir: "assets/img" }, vite: { base: ${cdnUrl}xonuxt/_nuxt/, },
16 replies
NNuxt
Created by konsav on 2/6/2025 in #❓・help
NuxtImg from assets folder
@kapa.ai
16 replies
NNuxt
Created by konsav on 2/6/2025 in #❓・help
NuxtImg from assets folder
@kapa.ai
16 replies
NNuxt
Created by konsav on 2/6/2025 in #❓・help
NuxtImg from assets folder
I add this
export default defineNuxtConfig({
image: {
dir: 'assets/images' // Adjust this path to match your asset structure
}
})
export default defineNuxtConfig({
image: {
dir: 'assets/images' // Adjust this path to match your asset structure
}
})
but i have the same issue.
16 replies
NNuxt
Created by konsav on 7/9/2024 in #❓・help
Issue with Upgrading @nuxt/image Module in Nuxt 3
Have someone the same problem?
3 replies
NNuxt
Created by konsav on 4/22/2024 in #❓・help
middleware/redirect.global.js
where should i put this condition?
16 replies
NNuxt
Created by konsav on 4/22/2024 in #❓・help
middleware/redirect.global.js
one on console and twice on terminal
16 replies
NNuxt
Created by konsav on 4/22/2024 in #❓・help
middleware/redirect.global.js
Apart from this middleware/redirect.global.js, I have also server/ middleware/ setHeaders.js that i set some headers in my project. Maybe this is the problem?
16 replies
NNuxt
Created by konsav on 4/22/2024 in #❓・help
middleware/redirect.global.js
ok i try to delete everything and i just left the code below. The log comes twice again export default defineNuxtRouteMiddleware(async (to, from) => { console.log("Test") });
16 replies
NNuxt
Created by konsav on 4/22/2024 in #❓・help
middleware/redirect.global.js
useFetch
16 replies
NNuxt
Created by konsav on 4/22/2024 in #❓・help
middleware/redirect.global.js
export default defineNuxtRouteMiddleware(async (to, from) => { const { $getApiData } = useNuxtApp(); if (to.path.includes("/test/") || to.path.includes("/test/abc")) { const data = await $getApiData.fetchData( $../redirect/url/${encodeURIComponent( to.fullPath )} ); const response = decodeURIComponent(data); await navigateTo(response, { redirectCode: 301, external: true, }); } });
16 replies
NNuxt
Created by konsav on 3/4/2024 in #❓・help
Cache-Control: max-age=604800, public.
Any idea?
4 replies
NNuxt
Created by konsav on 3/4/2024 in #❓・help
Cache-Control: max-age=604800, public.
No description
4 replies
NNuxt
Created by konsav on 3/4/2024 in #❓・help
Cache-Control: max-age=604800, public.
I add in server/plugin/header.ts import { RenderResponse } from "nitropack"; export default defineNitroPlugin((nitroApp) => { nitroApp.hooks.hook("render:response", (res: RenderResponse, { event }) => { res.headers["X-Frame-Options"] = "DENY"; res.headers["Cache-Control"] = "no-cache"; }); }); It adds in Cache-Control: no-cache but it appears max-age yet.
4 replies
NNuxt
Created by konsav on 5/17/2023 in #❓・help
SyntaxError: Unexpected token '?', SyntaxError: Unexpected token '.'
Thanks for your answer! My problem is that I have webpack as a bundler and I can't figure out how to set the target
16 replies
NNuxt
Created by konsav on 5/17/2023 in #❓・help
SyntaxError: Unexpected token '?', SyntaxError: Unexpected token '.'
This issue is still open... if there is anything else you could suggest, I would appreciate it!
16 replies
NNuxt
Created by konsav on 5/17/2023 in #❓・help
SyntaxError: Unexpected token '?', SyntaxError: Unexpected token '.'
I can't find something. If someone else can help, let me know! Thank you anyway @warflash
16 replies
NNuxt
Created by konsav on 5/17/2023 in #❓・help
SyntaxError: Unexpected token '?', SyntaxError: Unexpected token '.'
Could you help me where can i find a resource;
16 replies