Skip to content

Commit

Permalink
chore(demo): add package version to playground (#443)
Browse files Browse the repository at this point in the history
  • Loading branch information
d3m1d0v authored Oct 24, 2024
1 parent 3615444 commit 6693eb0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import webpack from 'webpack';
import type {StorybookConfig} from '@storybook/react-webpack5';

import pkg from '../package.json';

const config:StorybookConfig = {
framework: {
name: '@storybook/react-webpack5',
Expand All @@ -13,6 +16,14 @@ const config:StorybookConfig = {
typescript: {
check: true,
},
webpackFinal(config) {
config.plugins?.push(
new webpack.DefinePlugin({
__VERSION__: `'${pkg.version}-storybook'`,
}),
);
return config;
},
};

export default config;

0 comments on commit 6693eb0

Please sign in to comment.