Skip to content

Commit

Permalink
add postcss storybook addon
Browse files Browse the repository at this point in the history
  • Loading branch information
netroy committed Aug 30, 2022
1 parent e5eb8e1 commit 19f2a04
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 4 deletions.
32 changes: 32 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 9 additions & 4 deletions packages/design-system/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,17 @@ module.exports = {
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
{
name: '@storybook/addon-postcss',
options: {
postcssLoaderOptions: {
implementation: require('postcss'),
},
}
},
'storybook-addon-designs',
'storybook-addon-themes',
],
features: {
postcss: false,
},
webpackFinal: async (config) => {
config.module.rules.push({
test: /\.scss$/,
Expand Down Expand Up @@ -43,7 +48,7 @@ module.exports = {

config.resolve.alias = {
...config.resolve.alias,
"@/": path.resolve(__dirname, "../src/"),
'@/': path.resolve(__dirname, '../src/'),
};

return config;
Expand Down
1 change: 1 addition & 0 deletions packages/design-system/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"@storybook/addon-actions": "^6.5.10",
"@storybook/addon-essentials": "^6.5.10",
"@storybook/addon-links": "^6.5.10",
"@storybook/addon-postcss": "^2.0.0",
"@storybook/vue": "^6.5.10",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/vue": "^5.8.2",
Expand Down
5 changes: 5 additions & 0 deletions packages/design-system/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
plugins: {
autoprefixer: {},
},
};

0 comments on commit 19f2a04

Please sign in to comment.