From f667616107c967f86740e215fb552a1aaff2fbc3 Mon Sep 17 00:00:00 2001 From: abdullahalam123 Date: Sat, 13 Dec 2025 21:29:10 +0530 Subject: [PATCH] feat(i18n): Add Vietnamese language routing support to Vite config - Update language regex pattern to include Vietnamese (vi) locale - Modify pagesRewritePlugin to recognize and route Vietnamese URLs - Enable proper URL rewriting for /vi/* paths alongside existing en, de, zh routes - Ensures Vietnamese language pages are correctly served through development server --- vite.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vite.config.ts b/vite.config.ts index 262383c..32552f5 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -11,7 +11,7 @@ function pagesRewritePlugin(): Plugin { server.middlewares.use((req, res, next) => { const url = req.url?.split('?')[0] || ''; - const langMatch = url.match(/^\/(en|de|zh)(\/.*)?$/); + const langMatch = url.match(/^\/(en|de|zh|vi)(\/.*)?$/); if (langMatch) { const lang = langMatch[1]; const restOfPath = langMatch[2] || '/';