Skip to content

Commit

Permalink
Add mdx extension to tailwind content glob. (#4063)
Browse files Browse the repository at this point in the history
* Add mdx extension to tailwind content glob.

* Create wicked-hairs-rescue.md

Co-authored-by: Nate Moore <[email protected]>
  • Loading branch information
vikpe and natemoo-re authored Aug 3, 2022
1 parent 5f3b3b4 commit ec5518f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/wicked-hairs-rescue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"astro": patch
---

Add `mdx` extension to default generated Tailwind config.
2 changes: 1 addition & 1 deletion examples/with-tailwindcss/tailwind.config.cjs
Original file line number Diff line number Diff line change
@@ -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: {},
},
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/e2e/fixtures/tailwindcss/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/core/add/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {},
},
Expand Down
Original file line number Diff line number Diff line change
@@ -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: {
Expand Down

0 comments on commit ec5518f

Please sign in to comment.