Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(*): add css plugin for storybook #157

Merged
merged 3 commits into from
Nov 24, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

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