You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import { join, dirname } from 'path';
/**
* This function is used to resolve the absolute path of a package.
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
*/
function getAbsolutePath(value) {
return dirname(require.resolve(join(value, 'package.json')));
}
/** @type { import('@storybook/html-vite').StorybookConfig } */
const config = {
stories: [
'../src/**/*.mdx',
'../src/**/*.stories.@(js|jsx|mjs|ts|tsx)',
],
typescript: {
// Overrides the default Typescript configuration to allow multi-package components to be documented via Autodocs.
reactDocgen: 'react-docgen',
skipBabel: true,
check: false,
},
addons: [
getAbsolutePath('@storybook/addon-links'),
getAbsolutePath('@storybook/addon-essentials'),
getAbsolutePath('@storybook/addon-interactions'),
getAbsolutePath('@pxtrn/storybook-addon-docs-stencil'),
],
framework: {
name: getAbsolutePath('@storybook/html-vite'),
options: {},
},
core: {
builder: '@storybook/builder-vite',
disableTelemetry: true,
},
docs: {
autodocs: 'tag',
defaultName: 'Documentation',
},
staticDirs: ['../www/build']
};
export default config;
Configuration:
"@pxtrn/storybook-addon-docs-stencil": "^6.4.1",
"@stencil/angular-output-target": "^0.8.3",
"@storybook/addon-docs": "^7.6.15",
"@storybook/addon-essentials": "^7.6.15",
"@storybook/addon-interactions": "^7.6.15",
"@storybook/addon-links": "^7.6.15",
"@storybook/blocks": "^7.6.15",
"@storybook/builder-vite": "^7.6.15",
"@storybook/html": "^7.6.15",
"@storybook/html-vite": "^7.6.15",
"@storybook/test": "^7.6.15",
"@storybook/web-components": "^7.6.15",
main.js
Preview.jsx:
documentationTemplate.mdx:
stencil.config.ts:
The generated custom-elements-2.json generates the following entry for my component:
From your code the description is generated using:
As because the readme has some data, it generates the wrong description as shown:
The text was updated successfully, but these errors were encountered: