summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.changeset/shaggy-bulldogs-beam.md5
-rw-r--r--examples/with-tailwindcss/tailwind.config.cjs2
-rw-r--r--packages/astro/src/core/add/consts.ts2
3 files changed, 7 insertions, 2 deletions
diff --git a/.changeset/shaggy-bulldogs-beam.md b/.changeset/shaggy-bulldogs-beam.md
new file mode 100644
index 000000000..60e1ca555
--- /dev/null
+++ b/.changeset/shaggy-bulldogs-beam.md
@@ -0,0 +1,5 @@
+---
+"astro": patch
+---
+
+tailwind: add a default "contents" configuration that works for most Astro projects
diff --git a/examples/with-tailwindcss/tailwind.config.cjs b/examples/with-tailwindcss/tailwind.config.cjs
index 2282e757d..2711f9948 100644
--- a/examples/with-tailwindcss/tailwind.config.cjs
+++ b/examples/with-tailwindcss/tailwind.config.cjs
@@ -1,5 +1,5 @@
module.exports = {
- content: [],
+ content: ['./src/**/*.{astro,html,js,jsx,svelte,ts,tsx,vue}'],
theme: {
extend: {},
},
diff --git a/packages/astro/src/core/add/consts.ts b/packages/astro/src/core/add/consts.ts
index 7eb64b4db..d99fd942f 100644
--- a/packages/astro/src/core/add/consts.ts
+++ b/packages/astro/src/core/add/consts.ts
@@ -18,7 +18,7 @@ export const ALIASES = new Map([
]);
export const CONFIG_STUB = `import { defineConfig } from 'astro/config';\n\nexport default defineConfig({});`;
export const TAILWIND_CONFIG_STUB = `module.exports = {
- content: [],
+ content: ['./src/**/*.{astro,html,js,jsx,svelte,ts,tsx,vue}'],
theme: {
extend: {},
},