카테고리 없음
sveltekit 프로젝트 생성
유키공
2025. 2. 1. 10:46
sveltekit 프로젝트 생성
npx sv create my-sveltekit-app
cd my-sveltekit-app
adapter-node 설치(build폴더 생성)
npm install -D @sveltejs/adapter-node
svelte.config.js 수정
import adapter from '@sveltejs/adapter-node';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
/** @type {import('@sveltejs/kit').Config} */
const config = {
preprocess: vitePreprocess(),
kit: {
adapter: adapter({ out: 'build' }) // build 폴더가 생성되도록 설정
}
};
export default config;
npm run build
실행
npm run dev