@web/dev-server-storybook
Version:
Dev server plugin for using storybook with es modules.
14 lines • 549 B
JavaScript
import { createError } from '../utils.js';
const types = ['preact', 'web-components'];
export function validatePluginConfig(pluginConfig) {
if (!pluginConfig) {
throw createError('Missing plugin configuration.');
}
if (typeof pluginConfig.type !== 'string') {
throw createError('Missing project type in config.');
}
if (!types.includes(pluginConfig.type)) {
throw createError(`Invalid project type ${pluginConfig.type}, supported types: ${types}`);
}
}
//# sourceMappingURL=validatePluginConfig.js.map