diff options
author | 2022-08-03 21:04:44 +0200 | |
---|---|---|
committer | 2022-08-03 14:04:44 -0500 | |
commit | ec5518fe308ffe281b9e92755dec85489a1c1760 (patch) | |
tree | 799be198852bf754ae6ee9ef5f04b48f32421dba | |
parent | 5f3b3b44db4171255eb35bfc12a2256784fdbb4b (diff) | |
download | astro-ec5518fe308ffe281b9e92755dec85489a1c1760.tar.gz astro-ec5518fe308ffe281b9e92755dec85489a1c1760.tar.zst astro-ec5518fe308ffe281b9e92755dec85489a1c1760.zip |
Add mdx extension to tailwind content glob. (#4063)
* Add mdx extension to tailwind content glob.
* Create wicked-hairs-rescue.md
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
-rw-r--r-- | .changeset/wicked-hairs-rescue.md | 5 | ||||
-rw-r--r-- | examples/with-tailwindcss/tailwind.config.cjs | 2 | ||||
-rw-r--r-- | packages/astro/e2e/fixtures/tailwindcss/tailwind.config.js | 2 | ||||
-rw-r--r-- | packages/astro/src/core/add/index.ts | 2 | ||||
-rw-r--r-- | packages/astro/test/fixtures/tailwindcss/tailwind.config.js | 2 |
5 files changed, 9 insertions, 4 deletions
diff --git a/.changeset/wicked-hairs-rescue.md b/.changeset/wicked-hairs-rescue.md new file mode 100644 index 000000000..6b4da6b39 --- /dev/null +++ b/.changeset/wicked-hairs-rescue.md @@ -0,0 +1,5 @@ +--- +"astro": patch +--- + +Add `mdx` extension to default generated Tailwind config. diff --git a/examples/with-tailwindcss/tailwind.config.cjs b/examples/with-tailwindcss/tailwind.config.cjs index dc0ae5c8f..49971da79 100644 --- a/examples/with-tailwindcss/tailwind.config.cjs +++ b/examples/with-tailwindcss/tailwind.config.cjs @@ -1,5 +1,5 @@ module.exports = { - content: ['./src/**/*.{astro,html,js,jsx,md,svelte,ts,tsx,vue}'], + content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'], theme: { extend: {}, }, diff --git a/packages/astro/e2e/fixtures/tailwindcss/tailwind.config.js b/packages/astro/e2e/fixtures/tailwindcss/tailwind.config.js index 7aeb483c1..a7a741ba3 100644 --- a/packages/astro/e2e/fixtures/tailwindcss/tailwind.config.js +++ b/packages/astro/e2e/fixtures/tailwindcss/tailwind.config.js @@ -1,7 +1,7 @@ const path = require('path'); module.exports = { - content: [path.join(__dirname, 'src/**/*.{astro,html,js,jsx,md,svelte,ts,tsx,vue}')], + content: [path.join(__dirname, 'src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}')], theme: { extend: { colors: { diff --git a/packages/astro/src/core/add/index.ts b/packages/astro/src/core/add/index.ts index 4062e59e5..d6ee73791 100644 --- a/packages/astro/src/core/add/index.ts +++ b/packages/astro/src/core/add/index.ts @@ -41,7 +41,7 @@ const ALIASES = new Map([ const ASTRO_CONFIG_STUB = `import { defineConfig } from 'astro/config';\n\nexport default defineConfig({});`; const TAILWIND_CONFIG_STUB = `/** @type {import('tailwindcss').Config} */ module.exports = { - content: ['./src/**/*.{astro,html,js,jsx,md,svelte,ts,tsx,vue}'], + content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'], theme: { extend: {}, }, diff --git a/packages/astro/test/fixtures/tailwindcss/tailwind.config.js b/packages/astro/test/fixtures/tailwindcss/tailwind.config.js index 7aeb483c1..a7a741ba3 100644 --- a/packages/astro/test/fixtures/tailwindcss/tailwind.config.js +++ b/packages/astro/test/fixtures/tailwindcss/tailwind.config.js @@ -1,7 +1,7 @@ const path = require('path'); module.exports = { - content: [path.join(__dirname, 'src/**/*.{astro,html,js,jsx,md,svelte,ts,tsx,vue}')], + content: [path.join(__dirname, 'src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}')], theme: { extend: { colors: { |