storybookjs / addon-postcss

This Storybook addon can be used to run the PostCSS preprocessor against your stories.
MIT License
20 stars 22 forks source link

Add support for PostCSS 8 #36

Open Yash-Singh1 opened 2 years ago

Yash-Singh1 commented 2 years ago

See https://github.com/RyanClementsHax/storybook-addon-next/issues/7. PostCSS 8 is not supported yet as the addon specifies 7.0.x in the package.json. A solution could be to use peerDependencies to support PostCSS v7 and v8.

kylesuss commented 2 years ago

See https://github.com/storybookjs/addon-postcss#postcss-8 for instructions on how to use with PostCSS 8+

dimitrisnl commented 2 years ago

It might be functional, but without the explicit peerDependencies NPM@8 will go crazy

prateekj16 commented 1 year ago

This is not working even after adding postcss8 configuration in main.js. getting error for import { logger } from '@storybook/node-logger'; SyntaxError: Cannot use import statement outside a module

Also I am using it in the project with Tech stack Tailwindcss3, postcss8, storybook, react with typescript. I have imported the tailwindcss-3 css file in preview.js

mandado commented 1 year ago

I getting the same error of @prateekj16

tecbeast42 commented 1 year ago

same here

janeszelag commented 1 year ago

Same! Similar stack: tailwindcss 3, postcss 8, storybook, react 18. The build for Storybook works locally despite the error but only if I have the 3.0.0-alpha.1 version of this plugin. If I downgrade to 2.0.0 it breaks things...

prateekj16 commented 1 year ago

Same! Similar stack: tailwindcss 3, postcss 8, storybook, react 18. The build for Storybook works locally despite the error but only if I have the 3.0.0-alpha.1 version of this plugin. If I downgrade to 2.0.0 it breaks things...

@janeszelag I am facing the error with 3.0 alpha. Also I am using yarn to run storybook

pvandamme commented 1 year ago

Same here, see https://github.com/tailwindlabs/tailwindcss/discussions/6570#discussioncomment-2569691 for a temporary solution ! 😃 Worked just fine for me

DarioRega commented 1 year ago

I had the same problem, after looking around i found a quick fix was to downgrade to 2.x , see here https://github.com/storybookjs/storybook/issues/18727