DEV Community

Discussion on: Build a Web Component library with Stencil and Storybook

Collapse
 
vprothais profile image
vprothais

Hello,
Thank you for this article. For information, with newer versions of stencil and storybook I had to make some adjustments in order to make it works.

The Webpack config uses the collection folder that seems to not be created by default with the npm start with stencil 1.12. I had to modify the start script in order to make it build es5 files in dev mode :

"start": "stencil build --dev --watch --serve --es5",
Enter fullscreen mode Exit fullscreen mode

The Storybook Notes plugin (5.3.18) documentation gives a different object in order to use markdown. You need a notes node in the story parameter.

export default {
  title: 'My Component',
  parameters: {
    notes: {
      markdown: readme
    },
  },
};
Enter fullscreen mode Exit fullscreen mode

Hope it can help. Have a good day.

Collapse
 
jborja79 profile image
jborja79

hey, great article, also with the newer version of copy-webpack-plugin is necessary patterns node in storybook config .storybook/main.js

      new CopyPlugin({
        patterns: [
          {
            from: '**/*',
            to: './',
            context: 'dist',
          }
        ],
      }),
    );```


Enter fullscreen mode Exit fullscreen mode