-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow IDE plugin server to run without preview tab #1142
Comments
This appears to be working now. I'm not sure what I was doing differently before, but it wasn't. I'll re-open if it happens again with more info. |
It looks like it works for a bit and then the server dies after a while. |
Hey @kevinbarabash, the way it works right now is that the server keeps running while it's getting regular pings, but it stops after a little while otherwise. What I'm guessing is happening in your case is that you're perhaps switching to a different browser tab so the Preview.js browser tab is put to sleep and no longer pinging, and Preview.js thinks the tab is now closed so it shuts itself down. I'll admit this is a bit of a design flaw on my part! Any ideas how else we could make sure that the server does stop at some stage when it's no longer needed, but not too early? |
Having the option to manually start/stop the server could work. I'm guessing the server uses less resources than starting up Storybook. It would be nice to have a config option to auto-start the server when opening project in your IDE. |
Hey @kevinbarabash, since v1.24 released a couple of weeks ago, the Preview.js server will stay open until you explicitly stop it, so you can close the panel and not have to worry about the server stopping automatically. Next step will be to add a setting to skip opening a panel altogether and directly open a browser, then your feature request will be fully supported! |
Is your feature request related to a problem? Please describe.
I like viewing the component in the browser b/c I'm able to use the full power of the browser's dev tools. I tried using the CLI version, but I had to save changes to the file before they showed up. If I used the IDE plugin and opened the preview in the browser changes show up immediately, but... I had to keep the preview open inside the IDE as well which seems a little silly.
Describe the solution you'd like
I'd like to be able to run preview.js using the IDE plugin, but not have to keep the preview.js tab open in the IDE while I'm viewing components in my browser.
Describe alternatives you've considered
I tried using the CLI version, but I had to save changes to the file before they showed up.
The text was updated successfully, but these errors were encountered: