We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
0.59.0
0.58.9 doesn't have this problem, but upgrading to 0.59.0+ does.
npx create-next-app@latest
yarn add @unocss/postcss@0.59.0 or yarn add @unocss/postcss@0.59.2
yarn add @unocss/postcss@0.59.0
yarn add @unocss/postcss@0.59.2
postcss.config.js
module.exports = { plugins: { '@unocss/postcss': { content: ['**/*.{html,js,ts,jsx,tsx}'], }, }, }
uno.config.ts
import { defineConfig, presetUno } from 'unocss' export default defineConfig({ presets: [ presetUno(), // ... ], })
As of 2024/04/13, the latest version 0.59.2, installing 0.59.0 and above gives this following error.
{ "name": "nextjs14.2", "version": "0.1.0", "private": true, "scripts": { "dev": "next dev", "build": "next build", "start": "next start", "lint": "next lint" }, "dependencies": { "next": "14.2.1", "react": "^18", "react-dom": "^18" }, "devDependencies": { "@types/node": "^20", "@types/react": "^18", "@types/react-dom": "^18", "@unocss/postcss": "^0.59.0", "eslint": "^8", "eslint-config-next": "14.2.1", "typescript": "^5", "unocss": "^0.59.0" } }
The text was updated successfully, but these errors were encountered:
Had same error. The reason is that after building, the default export of CJS was replaced. https://github.com/unocss/unocss/pull/3380/files#diff-21462feba05a79008c54d9a3267569b27b8897540ac86e47110e57f25402d224R11
CJS
But Next.js plugins must be provided as strings. https://nextjs.org/docs/messages/postcss-shape
Next.js
You can roll back to version 0.58.9 until a solution is found.
Sorry, something went wrong.
No branches or pull requests
UnoCSS version
0.59.0
Describe the bug
0.58.9 doesn't have this problem, but upgrading to 0.59.0+ does.
Reproduction
Bug Realization Methods
npx create-next-app@latest
yarn add @unocss/postcss@0.59.0
oryarn add @unocss/postcss@0.59.2
postcss.config.js
uno.config.ts
As of 2024/04/13, the latest version 0.59.2, installing 0.59.0 and above gives this following error.
System Info
Validations
The text was updated successfully, but these errors were encountered: