Skip to content

Commit

Permalink
build(*): add css plugin for storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
DiyanDimitrov committed Nov 24, 2021
1 parent 44c1bf4 commit ffb425e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
const postCSS = require('rollup-plugin-postcss');

module.exports = {
stories: ['../dist/stories/**/*.stories.{js,md,mdx}'],

rollupConfig(config) {
config.plugins.push(postCSS({ include: ['**/*.scss'], inject: false }));

return config;
}
};
4 changes: 3 additions & 1 deletion .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ const getTheme = (themeName) => {

const themeProvider = (Story, context) => {
const theme = getTheme(context.globals.theme);
return html`
const htmlNoMin = html;

return htmlNoMin`
<style>
${theme.default}
</style>
Expand Down

0 comments on commit ffb425e

Please sign in to comment.