Skip to content

Commit 8f21f7b

Browse files
committed
Fix build 4
1 parent 590ecce commit 8f21f7b

3 files changed

Lines changed: 20 additions & 2 deletions

File tree

apps/ppp/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"@xterm/addon-fit": "^0.10.0",
2222
"@xterm/xterm": "^5.5.0",
2323
"dotnet-runtime": "workspace:*",
24+
"esm-env": "^1.2.2",
2425
"gleam-runtime": "workspace:*",
2526
"go-runtime": "workspace:*",
2627
"java-runtime": "workspace:*",

apps/ppp/vite.config.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ import { defineConfig } from 'vitest/config';
55
import { playwright } from '@vitest/browser-playwright';
66
import { sveltekit } from '@sveltejs/kit/vite';
77
import { viteStaticCopy } from 'vite-plugin-static-copy';
8-
import Icons from 'unplugin-icons/vite'
8+
import Icons from 'unplugin-icons/vite';
9+
import { DEV } from 'esm-env';
10+
11+
const base = DEV ? undefined : process.env.BASE_PATH?.slice(1);
912

1013
export default defineConfig({
1114
worker: {
@@ -35,7 +38,18 @@ export default defineConfig({
3538
paraglideVitePlugin({
3639
project: './project.inlang',
3740
outdir: './src/lib/paraglide',
38-
strategy: ['url', 'baseLocale']
41+
strategy: ['url', 'baseLocale'],
42+
urlPatterns: base
43+
? [
44+
{
45+
pattern: `/{${base}/}?:path(.*)?`,
46+
localized: [
47+
['ru', `/{${base}/}?ru/:path(.*)?`],
48+
['en', `/{${base}/}?:path(.*)?`]
49+
]
50+
}
51+
]
52+
: undefined
3953
}),
4054
viteStaticCopy({
4155
targets: [

pnpm-lock.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)