Skip to content

Commit 5ce3967

Browse files
authored
Merge pull request #5 from sonofmagic/dev
chore: vite-svelte case commit
2 parents dd82bcb + 9181c1b commit 5ce3967

File tree

8 files changed

+40
-12
lines changed

8 files changed

+40
-12
lines changed

apps/vite-svelte/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<title>Vite + Svelte + TS</title>
88
</head>
99
<body>
10-
<div id="app"></div>
10+
<div id="app" class="text-[red]"></div>
1111
<script type="module" src="/src/main.ts"></script>
1212
</body>
1313
</html>

apps/vite-svelte/package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@
1212
"devDependencies": {
1313
"@sveltejs/vite-plugin-svelte": "^2.0.3",
1414
"@tsconfig/svelte": "^3.0.0",
15+
"autoprefixer": "^10.4.14",
16+
"postcss": "^8.4.22",
1517
"svelte": "^3.55.1",
1618
"svelte-check": "^2.10.3",
19+
"tailwindcss": "^3.3.1",
20+
"tailwindcss-patch": "workspace:*",
1721
"tslib": "^2.5.0",
1822
"typescript": "^4.9.3",
19-
"vite": "^4.2.0",
20-
"tailwindcss-patch": "workspace:*",
21-
"unplugin-tailwindcss-mangle": "workspace:*"
23+
"unplugin-tailwindcss-mangle": "workspace:*",
24+
"vite": "^4.2.0"
2225
}
2326
}

apps/vite-svelte/postcss.config.cjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
plugins: {
3+
tailwindcss: {},
4+
autoprefixer: {}
5+
}
6+
}

apps/vite-svelte/src/App.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
</script>
66

77
<main>
8-
<div>
8+
<div class="flex justify-between">
99
<a href="https://vitejs.dev" target="_blank" rel="noreferrer">
1010
<img src={viteLogo} class="logo" alt="Vite Logo" />
1111
</a>
1212
<a href="https://svelte.dev" target="_blank" rel="noreferrer">
1313
<img src={svelteLogo} class="logo svelte" alt="Svelte Logo" />
1414
</a>
1515
</div>
16-
<h1>Vite + Svelte</h1>
16+
<h1 class="text-[40px]">Vite + Svelte</h1>
1717

1818
<div class="card">
1919
<Counter />

apps/vite-svelte/src/app.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;
4+
15
:root {
26
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
37
line-height: 1.5;

apps/vite-svelte/tailwind.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/** @type {import('tailwindcss').Config} */
2+
module.exports = {
3+
content: ['./index.html', './src/**/*.{html,js,svelte,ts}'],
4+
theme: {
5+
extend: {}
6+
},
7+
plugins: []
8+
}

apps/vite-svelte/vite.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { defineConfig } from 'vite'
22
import { svelte } from '@sveltejs/vite-plugin-svelte'
3-
3+
import { vitePlugin as utwm } from 'unplugin-tailwindcss-mangle'
44
// https://vitejs.dev/config/
55
export default defineConfig({
6-
plugins: [svelte()]
6+
plugins: [svelte(), utwm()]
77
})

pnpm-lock.yaml

Lines changed: 11 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)