From f26845126863e7566e43f118af5d4eb2d991733c Mon Sep 17 00:00:00 2001 From: "Fred K. Schott" Date: Fri, 25 Mar 2022 17:11:45 -0700 Subject: [PATCH] small tailwind example config fix (#2893) * fix tailwind config example * Create shaggy-bulldogs-beam.md --- .changeset/shaggy-bulldogs-beam.md | 5 +++++ examples/with-tailwindcss/tailwind.config.cjs | 2 +- packages/astro/src/core/add/consts.ts | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/shaggy-bulldogs-beam.md diff --git a/.changeset/shaggy-bulldogs-beam.md b/.changeset/shaggy-bulldogs-beam.md new file mode 100644 index 000000000000..60e1ca555ab9 --- /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 2282e757dc47..2711f99485c6 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 7eb64b4db539..d99fd942f8f7 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: {}, },