Unverified Commit 3020c44d authored by Tobias Koppers's avatar Tobias Koppers Committed by GitHub

update with-turbopack example for postcss/tailwind support (#44261)

parent 0572e218
......@@ -11,21 +11,7 @@ This playground is a mirror of the [Next.js v13 App Directory Playground](https:
1. Install dependencies: `yarn`
1. Start the dev server: `yarn dev`
**Note:** The playground uses [Tailwind CSS](https://tailwindcss.com). However, Turbopack does not yet support fully [PostCSS](https://turbo.build/pack/docs/features/css#postcss), but it does support CSS and CSS Modules. [As a workaround](https://turbo.build/pack/docs/features/css#tailwind-css), we run Tailwind through it's CLI upon `postinstall`. For live reload of CSS, you can run Tailwind in another process with the `--watch` flag or install `concurrently` and modify your `dev` script:
```bash
yarn add concurrently --dev
```
Then modify your `dev` script in `package.json`:
```json
{
"scripts": {
"dev": "concurrently \"next dev --turbo\" \"npm run tailwind --watch\""
}
}
```
**Note:** The playground uses [Tailwind CSS](https://tailwindcss.com) via [PostCSS](https://turbo.build/pack/docs/features/css#postcss).
For more information, see: https://turbo.build/pack/docs/features/css#tailwind-css
......
import '@/styles/dist.css';
import '@/styles/globals.css';
import React from 'react';
import AddressBar from '@/ui/AddressBar';
import GlobalNav from './GlobalNav';
......
......@@ -2,13 +2,10 @@
"private": true,
"scripts": {
"dev": "next dev --turbo",
"dev:tailwind": "concurrently \"next dev --turbo\" \"npm run tailwind -- --watch\"",
"build": "next build",
"start": "next start",
"lint": "next lint",
"tailwind": "tailwindcss -i styles/globals.css -o styles/dist.css",
"format": "prettier --write \"**/*.{js,ts,tsx,md}\"",
"postinstall": "npm run tailwind"
"format": "prettier --write \"**/*.{js,ts,tsx,md}\""
},
"prettier": {
"arrowParens": "always",
......@@ -18,7 +15,6 @@
},
"dependencies": {
"clsx": "1.2.1",
"concurrently": "7.5.0",
"next": "latest",
"react": "18.2.0",
"react-dom": "18.2.0",
......
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment