Skip to content

Commit 698ab55

Browse files
authored
Enable JIT for Tailwind + Emotion CSS example (vercel#23912)
1 parent 2186f1e commit 698ab55

3 files changed

Lines changed: 20 additions & 10 deletions

File tree

examples/with-tailwindcss-emotion/package.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,20 @@
77
"start": "next start"
88
},
99
"dependencies": {
10-
"@emotion/react": "^11.1.1",
11-
"@emotion/styled": "11.0.0",
12-
"react": "17.0.1",
13-
"react-dom": "17.0.1"
10+
"@emotion/react": "^11.1.5",
11+
"@emotion/styled": "11.3.0",
12+
"react": "17.0.2",
13+
"react-dom": "17.0.2",
14+
"tailwindcss-filters": "3.0.0"
1415
},
1516
"devDependencies": {
16-
"@babel/core": "^7.12.9",
17-
"@emotion/babel-plugin": "11.0.0",
18-
"autoprefixer": "10.0.2",
17+
"@babel/core": "^7.13.15",
18+
"@emotion/babel-plugin": "11.3.0",
19+
"autoprefixer": "10.2.5",
1920
"next": "latest",
20-
"postcss": "8.1.10",
21+
"postcss": "8.2.10",
2122
"tailwindcss": "^2.1.1",
22-
"xwind": "0.7.2"
23+
"xwind": "0.8.0"
2324
},
2425
"license": "MIT"
2526
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// If you want to use other PostCSS plugins, see the following:
2+
// https://tailwindcss.com/docs/using-with-preprocessors
3+
module.exports = {
4+
plugins: {
5+
tailwindcss: {},
6+
autoprefixer: {},
7+
},
8+
}

examples/with-tailwindcss-emotion/tailwind.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ const colors = require('tailwindcss/colors')
22

33
module.exports = {
44
mode: 'jit',
5+
purge: ['./pages/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}'],
56
darkMode: 'class',
67
theme: {
78
extend: {
89
colors,
910
},
1011
},
1112
variants: {},
12-
plugins: [],
13+
plugins: [require('tailwindcss-filters')],
1314
// xwind options
1415
xwind: {
1516
mode: 'objectstyles',

0 commit comments

Comments
 (0)