Skip to content

Commit

Permalink
IT-5852 Disable dts in storybook build
Browse files Browse the repository at this point in the history
  • Loading branch information
fraszczakszymon committed Oct 3, 2024
1 parent 7e20f4b commit 0d6cf6b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ const isProductionMode = () => {
return process.env.NODE_ENV === 'production';
}

const ignoredProductionPlugins = [
'vite:dts',
];

const config: StorybookConfig = {
stories: ['../lib/**/*.stories.@(js|ts)'],
addons: [
Expand All @@ -23,12 +27,14 @@ const config: StorybookConfig = {
],
framework: '@storybook/vue3-vite',
viteFinal: (config) => {
config.plugins.push(scssPreviewStylesPlugin({
isProductionMode: isProductionMode(),
}));

return {
...config,
plugins: [
...config.plugins.filter((plugin) => !ignoredProductionPlugins.includes((plugin as any)?.name)),
scssPreviewStylesPlugin({
isProductionMode: isProductionMode(),
})
]
};
},
};
Expand Down

0 comments on commit 0d6cf6b

Please sign in to comment.