Replies: 3 comments 7 replies
-
Hi @mapten |
Beta Was this translation helpful? Give feedback.
-
Hi, I had same (or I guess it´s similar) issue. # package.json
{
"scripts": {
"storybook": "yarn tailwind:watch | yarn storybook:dev",
"storybook:dev": "storybook dev -p 6006",
"storybook:build": "yarn tailwind:build && storybook build",
"tailwind:build": "yarn tailwindcss --cwd ./our_base_path -i ./path_to_input_file/styles.css -o ./path_to_output_file/styles.css",
"tailwind:watch": "yarn tailwind:build --watch",
},
"devDependencies": {
"@tailwindcss/cli": "^4.0.6"
}
} // preview.tsx
import "./path_to_output_file/styles.css" |
Beta Was this translation helpful? Give feedback.
-
Is this is an issue specifically with Edit: For now, my workaround is to use // postcss.config.mjs
/** @type {import('postcss-load-config').Config} */
const config = {
plugins: {
'@tailwindcss/postcss': {},
},
}
export default config |
Beta Was this translation helpful? Give feedback.
-
Hi all.
I have a monorepo application built with React + Vite + Nx + Tailwind 3. I use Storybook for components sub-project.
I've just updated to Tailwind 4, using Vite Tailwind configuration, but it does not work with Storybook, I have this error:
[vite] (client) Pre-transform error: Can't resolve 'tailwindcss' in '[path]\libs\shared-components\src'
Plugin: @tailwindcss/vite:generate:serve
File: [path]/libs/shared-components/src/index.css
[vite] Internal server error: Can't resolve 'tailwindcss' in '[path]\libs\shared-components\src'
EDIT: I've tried Tailwind 4 in a separate web application and it works fine.
Any idea? Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions