Configure path aliases
If you are using SvelteKit and are not using the default alias If you are not using SvelteKit, then you’ll need to update your path aliases in your
$lib, you’ll need to update your svelte.config.js file to include those aliases.svelte.config.js
tsconfig.json and vite.config.ts.tsconfig.json
vite.config.ts
Configure styles
Add the following to your global CSS file. You can learn more about using CSS variables for theming in the theming section.Feel free to add or modify as needed to suit your project.
src/routes/layout.css
Configure utils
You’ll want to create a
cn helper to make it easier to conditionally add and merge Tailwind CSS classes.src/lib/utils.ts
Import styles to your app
Create
src/routes/+layout.svelte and import the styles:src/routes/+layout.svelte