المنسقات والكود
منشئ مكونات + صفحات SvelteKit
+page.svelte, +page.server.ts and load functions in one go.
ملاحظة المحرر
Understanding · +page, +page.server, +layout — that's it.
هذا الفصل المعمّق متاح حاليًا باللغة الإنجليزية فقط. أداة التحويل أعلاه تعمل بلغتك؛ أما المقال التفصيلي الطويل فلم تتم ترجمته بعد.
الأسئلة المتكررة
Quick answers.
›What is the difference between +page.ts and +page.server.ts?
`+page.ts` runs on both the server and the client for universal data fetching, while `+page.server.ts` only runs on the server. Use the server version for operations requiring private environment variables or direct database access.
›Are the generated files saved to my disk?
No. This tool generates the code text which you can then copy and paste into your local IDE. It does not have permission to modify your local filesystem directly.
›Does this support Svelte 5 snippets and runes?
Yes. You can toggle between legacy Svelte 4 syntax and the newer Svelte 5 runes including `$state` and `$derived` within the settings.
›Can I include TypeScript by default?
Yes. The generator defaults to TypeScript syntax for script blocks and load functions, but you can switch to plain JavaScript if your project requires it.
يبحث الأشخاص أيضًا عن
أدوات ذات صلة
More in this room.
- JSON إلى React Hook Form + Zodمخطط نموذجTyped و hook useForm من شكل JSON.
- JSON إلى Next.js Server ActionServer Action مع تحليل Zod وإعادة التحقق من المسار revalidatePath.
- JSON إلى Prisma Schema Modelإنشاء كتلة نموذج Prisma من عينة JSON.
- JSON إلى Drizzle ORM Schemaتعريف Drizzle pgTable مع $inferSelect / $inferInsert.
- JSON إلى كيان TypeORMفئة TypeORM @Entity مع أدوات تزيين ومعرف مُنشأ.
- JSON إلى Mongoose Schema + ModelMongoose Schema + نموذج مع طوابع زمنية وأنواع.