1.ADD TAILWIND
yarn add -D postcss-preset-env tailwindcss
npx tailwind init
module.exports = {
plugins: ['tailwindcss', 'postcss-preset-env'],
}
@tailwind base;
@tailwind components;
@tailwind utilities;
import '../styles/index.css'
yarn add @emotion/babel-preset-css-prop @emotion/core @emotion/styled @zeit/next-css twin.macro
then add this to package.json
"babelMacros": {
"twin": {
"config": "tailwind.config.js",
"preset": "emotion",
"debugProp": true,
"debugPlugins": false,
"debug": false
}
}
create .babel.rc
{
"presets": [
"next/babel",
"@emotion/babel-preset-css-prop"
],
"plugins": [
"babel-plugin-macros"
]
}