Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update with-tailwindcss example #10141

Merged
merged 3 commits into from Jan 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 6 additions & 7 deletions examples/with-tailwindcss/package.json
Expand Up @@ -7,15 +7,14 @@
"start": "next start"
},
"dependencies": {
"next": "^9.1.8-canary.11",
"react": "^16.7.0",
"react-dom": "^16.7.0"
"next": "^9.2.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"next": "^9.2.0",
"next": "latest",

We can set this to latest now that built-in CSS support has landed on stable

"react": "^16.12.0",
"react-dom": "^16.12.0"
},
"devDependencies": {
"@fullhuman/postcss-purgecss": "^1.3.0",
"autoprefixer": "^9.6.5",
"cssnano": "^4.1.0",
"postcss-easy-import": "^3.0.0",
"tailwindcss": "^1.0.1"
"autoprefixer": "^9.7.4",
"postcss-import": "^12.0.1",
"tailwindcss": "^1.1.4"
}
}
2 changes: 1 addition & 1 deletion examples/with-tailwindcss/pages/index.js
Expand Up @@ -4,7 +4,7 @@ export default () => (
<div>
<Nav />
<div className="hero">
<h1 className="title">Next.js + Tailwind css</h1>
<h1 className="title">Next.js + Tailwind CSS</h1>
</div>
</div>
)
3 changes: 1 addition & 2 deletions examples/with-tailwindcss/postcss.config.js
Expand Up @@ -9,8 +9,7 @@ module.exports = {
'./pages/**/*.{js,jsx,ts,tsx}',
'./components/**/*.{js,jsx,ts,tsx}',
],
defaultExtractor: content =>
content.match(/[A-Za-z0-9-_:/]+/g) || [],
defaultExtractor: content => content.match(/[\w-/:]+(?<!:)/g) || [],
},
]
: undefined,
Expand Down
2 changes: 1 addition & 1 deletion examples/with-tailwindcss/styles/index.css
Expand Up @@ -2,8 +2,8 @@

/* purgecss start ignore */
@tailwind base;
/* purgecss end ignore */
@tailwind components;
/* purgecss end ignore */
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved /* purgecss end ignore */ 1 line down according to https://tailwindcss.com/docs/controlling-file-size#setting-up-purgecss

@tailwind utilities;

.hero {
Expand Down