Privary features are
- Svelte is a compiler
- Write less code
- Readability is important
- No virtual DOM
- Node: 16.7+
# Use SvelteKit for building tool
npm init svelte my-app
cd my-app
npm install
npm run dev
# Use Vitejs for building tool
npm init vite my-app2 -- --template svelte
cd my-app2
tsc --noEmit
npx vite build
# target dirs are
# - static/
# - build/
- github pages に、deploy する場合、svelte で出力したディレクトリ
_app
内のファイルが 400 エラーになり、app
にリネームすることで対応した。 - svelte.config.js の変更
const config = {
kit: {
...
appDir: 'app',
...
}
};