mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-05 06:01:22 +08:00
Merge pull request #5911 from storybooks/4995-custom-presets
Remove custom presets warning
This commit is contained in:
commit
2339ce7fc3
@ -1,17 +1,7 @@
|
|||||||
import path from 'path';
|
import path from 'path';
|
||||||
import { logger } from '@storybook/node-logger';
|
|
||||||
import serverRequire from '../utils/server-require';
|
import serverRequire from '../utils/server-require';
|
||||||
|
|
||||||
export default function loadCustomPresets({ configDir }) {
|
export default function loadCustomPresets({ configDir }) {
|
||||||
const presets = serverRequire(path.resolve(configDir, 'presets'));
|
const presets = serverRequire(path.resolve(configDir, 'presets'));
|
||||||
|
return presets || [];
|
||||||
if (presets) {
|
|
||||||
logger.warn(
|
|
||||||
'"Custom presets" is an experimental and undocumented feature that will be changed or deprecated soon. Use it on your own risk.'
|
|
||||||
);
|
|
||||||
|
|
||||||
return presets;
|
|
||||||
}
|
|
||||||
|
|
||||||
return [];
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user