diff --git a/bun.lockb b/bun.lockb index 4ff4bdb76..684776232 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 1f3a8d59d..883987832 100644 --- a/package.json +++ b/package.json @@ -4,16 +4,18 @@ "private": true, "scripts": { "dev": "vite dev", - "build": "vite build", + "build": "npx @inlang/paraglide-js compile --project ./project.inlang --outdir ./src/lib/paraglide && vite build", "preview": "vite preview", "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", + "clean": "rm -rf ./.svelte-kit ./node_modules ./src/paraglide", "lint": "prettier --check . && eslint .", "format": "prettier --write ." }, "devDependencies": { "@inlang/paraglide-js": "1.11.2", "@inlang/paraglide-sveltekit": "0.11.0", + "@inlang/paraglide-vite": "^1.2.74", "@sveltejs/adapter-auto": "^3.2.2", "@sveltejs/adapter-cloudflare": "^4.6.1", "@sveltejs/kit": "^2.5.18", diff --git a/vite.config.ts b/vite.config.ts index 8790868fe..a5562e2be 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,7 +1,13 @@ import { paraglide } from '@inlang/paraglide-sveltekit/vite'; import { sveltekit } from '@sveltejs/kit/vite'; import { defineConfig } from 'vite'; +import path from 'node:path'; export default defineConfig({ - plugins: [paraglide({ project: './project.inlang', outdir: './src/lib/paraglide' }), sveltekit()] + plugins: [paraglide({ project: './project.inlang', outdir: './src/lib/paraglide' }), sveltekit()], + resolve: { + alias: { + $paraglide: path.resolve(__dirname, './src/paraglide') + } + } }); diff --git a/wrangler.toml b/wrangler.toml new file mode 100644 index 000000000..7a01b0b70 --- /dev/null +++ b/wrangler.toml @@ -0,0 +1 @@ +compatibility_flags = ["nodejs_compat"]