Skip to content

@storybook/server add native support for livereload #13136

@santialbo

Description

@santialbo

With @storybook/server one of the nicest features of storybook which is live updates is lost.
I've managed to recreate it by creating a livereload server and embedding the livereload script (<script src="http://localhost:35729/livereload.js"></script>) on the responses from my server. It works nice and I think this could probably be a natively supported feature.

Describe the solution you'd like
If the property livereload is passed to the parameters the livereload script is embedded automatically on the story.

export const parameters = {
  server: {
    url: `http://localhost:${process.env.PORT || 5000}`,
    livereload: process.env.LR_PORT || 35729
  }
};

Describe alternatives you've considered
The only alternative is adding it myself but other people could benefit from this.

Are you able to assist to bring the feature to reality?
yes!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions