sveltekit installation
svelte install
sveltekit install
NOTE: Svelte-kit requires updated node js in the system
- Run this command to create a blank Skelton project
or Runnpm create svelte@latest .
This will create the project on the current directorynpm create svelte@latest my-app
- Install node modules
This will create the project on the my-app directory
npm i
- Run dev Server
npm run dev -- --dev
- Add tailwind using npx and svelte-add
npx svelte-add@latest tailwindcss
- Install daisyui
npm i daisyui
- Open tailwind.config.cjs add daisyui using add this line inside the plugin array require('daisyui')
Open app.html then add the theme to html language tagIf you want dark theme of daisyui thenconst config = { content: ['./src/**/*.{html,js,svelte,ts}'], theme: { extend: {} }, plugins: [require('daisyui')] }; module.exports = config;
<html data-theme="dark"></html>
- Run the dev server
npm run dev -- --host