addon-postcss icon indicating copy to clipboard operation
addon-postcss copied to clipboard

Add support for PostCSS 8

Open Yash-Singh1 opened this issue 3 years ago • 9 comments

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.

Yash-Singh1 avatar Feb 21 '22 03:02 Yash-Singh1

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

kylesuss avatar Jun 07 '22 15:06 kylesuss

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

dimitrisnl avatar Jun 30 '22 07:06 dimitrisnl

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

prateekj16 avatar Jul 20 '22 12:07 prateekj16

I getting the same error of @prateekj16

mandado avatar Jul 20 '22 12:07 mandado

same here

tecbeast42 avatar Jul 20 '22 14:07 tecbeast42

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 avatar Jul 21 '22 02:07 janeszelag

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

prateekj16 avatar Jul 21 '22 03:07 prateekj16

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

pvandamme avatar Jul 21 '22 15:07 pvandamme

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

DarioRega avatar Jul 23 '22 22:07 DarioRega