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

Core: Fix features, core, logLevel in main.js config types #14745

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions examples/official-storybook/main.ts
Expand Up @@ -2,7 +2,7 @@

import type { StorybookConfig } from '@storybook/react/types';

module.exports = {
const config: StorybookConfig = {
stories: [
// FIXME: Breaks e2e tests './intro.stories.mdx',
'../../lib/ui/src/**/*.stories.@(js|tsx|mdx)',
Expand Down Expand Up @@ -35,4 +35,6 @@ module.exports = {
builder: 'webpack4',
},
logLevel: 'debug',
} as StorybookConfig;
};

module.exports = config;
6 changes: 4 additions & 2 deletions examples/react-ts-webpack4/main.ts
@@ -1,6 +1,6 @@
import type { StorybookConfig } from '@storybook/react/types';

module.exports = {
const config: StorybookConfig = {
stories: ['./src/*.stories.*'],
logLevel: 'debug',
addons: [
Expand All @@ -27,4 +27,6 @@ module.exports = {
propFilter: (prop) => ['label', 'disabled'].includes(prop.name),
},
},
} as StorybookConfig;
};

module.exports = config;
6 changes: 4 additions & 2 deletions examples/react-ts/main.ts
@@ -1,6 +1,6 @@
import type { StorybookConfig } from '@storybook/react/types';

module.exports = {
const config: StorybookConfig = {
stories: ['./src/*.stories.*'],
logLevel: 'debug',
addons: [
Expand Down Expand Up @@ -31,4 +31,6 @@ module.exports = {
features: {
postcss: false,
},
} as StorybookConfig;
};

module.exports = config;
8 changes: 8 additions & 0 deletions lib/core-common/src/types.ts
Expand Up @@ -229,6 +229,14 @@ export interface StorybookConfig {
options?: any;
}
>;
core?: CoreConfig;
logLevel?: string;
/**
* Allows to disable deprecated implicit PostCSS loader.
*/
features?: {
postcss?: boolean;
};
/**
* Tells Storybook where to find stories.
*
Expand Down