stencil-storybook-wrapper
stencil-storybook-wrapper copied to clipboard
See both storybook and stencil
First of all, thank you for this amazing storybook wrapper. I'm trying it all works perfecty but I have only one question. I'm not able to run the stencil page of my components. In your doc I've read this:
// Start the dev server for both stencil and storybook
"start": "npm-run-all --parallel stencil storybook",
but if I do npm run start
, the dev server localhost gives me this:
I'm not able to see the stencil component page anymore, but only the storybook.
I've also tryied to create another command only for stencil with "stencil build --dev --watch --serve"
but this gives me the same problem. Same problem also with npm run stencil
.
I'm stuck with this unfortunately.
Thank you in advance
You have to manually include your components in the index.html file, like so:
<script type="module" src="/build/stencil-storybook.esm.js"></script>
<script nomodule src="/build/stencil-storybook.js"></script>
Thank you so much, I'll try this asap!
I've added inside index.html
<head>
<meta charset="utf-8" />
<title>Stencil Storybook Wrapper | Component Starter</title>
<script type="module" src="/build/stencil-storybook.esm.js"></script>
<script nomodule src="/build/stencil-storybook.js"></script>
</head>
and ran npm run start
( "start": "npm-run-all --parallel stencil storybook",
) but nothing changed.
You have to rename your files, "stencil-storybook" is the name for MY project folder. Rename the script to yours, f. e.
<script type="module" src="/build/your-unbelievable-cool-project.esm.js"></script>
;-)