Closed jose-mpd closed 3 years ago
Howdy @jose-mpd! This module will not be usable until Storybook 6.2 - as it requires a new feature that also needed to deprecate the automatic addition of the loaders causing your error.
You can try it out with https://github.com/storybookjs/storybook/releases/tag/v6.2.0-alpha.17 - you'll need to run npx sb upgrade --prerelease
to upgrade all your deps.
Further information is available at https://github.com/storybookjs/storybook/issues/12668 and https://github.com/storybookjs/storybook/pull/13669
thanks,resolved
Describe the bug
Use postcss version 8 with storybook and @addon-postcss produces duplication in loader configurations
Steps to reproduce the behavior
(1:1) /home/josyto/proyect/packages/frontend/src/styles/index.css Unknown word
@ ./src/styles/index.css 2:26-409 53:4-74:5 56:18-401 @ ./.storybook/preview.js @ ./.storybook/preview.js-generated-config-entry.js @ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.storybook/storybook-init-framework-entry.js ./node_modules/@storybook/addon-docs/dist/frameworks/common/config.js-generated-other-entry.js ./node_modules/@storybook/addon-docs/dist/frameworks/react/config.js-generated-other-entry.js ./node_modules/@storybook/addon-links/dist/preset/addDecorator.js-generated-other-entry.js ./node_modules/@storybook/addon-actions/dist/preset/addDecorator.js-generated-other-entry.js ./node_modules/@storybook/addon-actions/dist/preset/addArgs.js-generated-other-entry.js ./node_modules/@storybook/addon-backgrounds/dist/preset/addDecorator.js-generated-other-entry.js ./node_modules/@storybook/addon-backgrounds/dist/preset/addParameter.js-generated-other-entry.js ./.storybook/preview.js-generated-config-entry.js ./.storybook/generated-stories-entry.js ./node_modules/webpack-hot-middleware/client.js?reload=true&quiet=false&noInfo=undefined Child HtmlWebpackCompiler: Asset Size Chunks Chunk Names child-HtmlWebpackPlugin_0 6.19 KiB HtmlWebpackPlugin_0 HtmlWebpackPlugin_0 Entrypoint HtmlWebpackPlugin_0 = child-HtmlWebpackPlugin_0 [./node_modules/html-webpack-plugin/lib/loader.js!./node_modules/@storybook/core/dist/server/templates/index.ejs] 1.98 KiB {HtmlWebpackPlugin_0} [built]
Expected behavior
There should be only one css loader configuration
Package.json, main.js, and postcss.config.js
Additional context
I was testing this addon to stop using Tailwind compatibility version with PostCSS 7 and Storybook and move to version 8 when I discovered the duplicity.
Doing tests I was able to solve it by introducing changes in the webpack configuration and removing the duplicate configuration with certain changes. 🔧