Skip to content

Latest commit

 

History

History
91 lines (66 loc) · 2.09 KB

svelte.md

File metadata and controls

91 lines (66 loc) · 2.09 KB

Svelete

Privary features are

  • Svelte is a compiler
  • Write less code
    • Readability is important
  • No virtual DOM

Requirements

  • Node: 16.7+

References

Development reference

SvelteKit

Others

Setup

# 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

Configuration

svelte.config.js

Deploy

Procedure

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',
    ...
	}
};