@leanweb/fullstack
v0.3.1
Published
🚧 [WIP]
Downloads
1
Readme
Core
🚧 [WIP]
✨ Features
- Templates with Svelte and Markdown
- Markdown (.svx)
- Hot reload
- HTML asset bundling
- Autogenerated environment variables types
- Islands (coming soon)
Configuration
Fullstack is simple a vite plugin, you configure it like any other vite plugin
import { defineConfig } from "vite";
import { fullstack } from "@leanweb/fullstack";
export default defineConfig({
plugins: [
fullstack({
/* ...config */
}),
],
});
API
publicEnvPrefix
: defaultPUBLIC\_
extensions
: default.svelte
,.svx
serverEntry
: default src/entry.{js,ts,mjs,mts}preprocess
: see herecompilerOptions
: see here
Svelte SSR
To import svelte files as SSR components include ssr
query in file import i.e
import About from "./views/about.svelte?ssr";
Which also gives you TypeScript types for the SSR output.
Non SSR components can be imported normally i.e
import About from "./views/about.svelte";