Open dakom opened 3 years ago
I ran into a similar issue. For a client we're building a library of web components. We're documenting these in Storybook. I'd like to be able to run Storybook and Stencil at the same time and have Storybook reload whenever Stencil components change.
To do so I'm loading our components into Storybook using loader
. However, this isn't generated in dev mode. I've switched to using the non-dev build for my Stencil development, but this feels hacky. Is there a better way to hook into the dev output?
Thanks!
It seems to me that this is a general problem with the integration in Storybook. Are there already any efforts to solve this issue? And are there any reasons why the loader is only generated for the prod build?
If there is no technical reason I would like to propose something like a --loader
or even --no-loader
flag for the CLI to control or prevent the generation of these files.
I ran into a similar issue. For a client we're building a library of web components. We're documenting these in Storybook. I'd like to be able to run Storybook and Stencil at the same time and have Storybook reload whenever Stencil components change.
To do so I'm loading our components into Storybook using
loader
. However, this isn't generated in dev mode. I've switched to using the non-dev build for my Stencil development, but this feels hacky. Is there a better way to hook into the dev output?Thanks!
Have you consider using the script "build.watch": "stencil build --docs --watch"
?
Thanks @marcolanaro !
That's the script I ended up using. I was just curious why I wasn't able to use the --dev
flag while doing local development that relied on the loader files for integrations.
Hey all,
Sorry that this didn't get a response from the Stencil team for quite a while. It looks like there's a workaround here which hopefully has at least got things moving along.
As far as I'm aware the omission of the loader
output from stencil build --dev
is intentional, but there's no reason that couldn't change in the future! Accordingly, I'm going to mark this as a feature request to gauge interest from the community.
Stencil version:
I'm submitting a:
[x] bug report
Current behavior:
stencil build
produces theloader
stuff, butstencil build --dev
does notExpected behavior:
stencil build --dev
should produce the loader stuffOther information: I'm not entirely clear on how the loader stuff is used, only that when I build with the React bindings (e.g.
react-output-target
) it fails without that.