Skip to content
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

Difference of behaviour between serve and http-server #631

Open
eric-burel opened this issue Sep 9, 2020 · 8 comments
Open

Difference of behaviour between serve and http-server #631

eric-burel opened this issue Sep 9, 2020 · 8 comments

Comments

@eric-burel
Copy link

eric-burel commented Sep 9, 2020

Hi, we have noticed some discrepancies between serve and http-server when opening a Storybook static export.
Issue is described here: storybookjs/storybook#10933

To sum it up, with http-server the first story opens correctly, but not with serve, which seems a bit less reliable for yet unknown reasons.
image

While you should get this (this is the result with http-server):
image

It sounds like a failing redirection but I have no log message.

I have a reproduction, but not minimal, in Vulcan Next. That may still help to debug.

git clone https://github.com/VulcanJS/vulcan-next.git
cd vulcan-next
yarn
yarn build:storybook
serve storybook-static # this will mostly work but not reliably, while http-server will work ok
@theKashey
Copy link

serve needs at least cleanUrl:false option

@eric-burel
Copy link
Author

cleanUrls seems to break everything for me:
image

@eric-burel
Copy link
Author

See vercel/next.js#18775 for a reproducible minimal example

@baptisteArno
Copy link

Any update on this @eric-burel? We can't use http-server because it doesn't compress files.

I can't think of other solutions 🤔

@eric-burel
Copy link
Author

Haven't checked in a while! Do you still have this issue? You'll probably want to access the right URL directly, maybe smth like "/index.html".

@baptisteArno
Copy link

Yep, problem still exists! We ended up using static-web-server.

@Wxh16144
Copy link

Wxh16144 commented Apr 9, 2023

I'm curious what the difference is between serve and https-server🤔

@bchewy
Copy link

bchewy commented Aug 1, 2024

can be resolved with

serve.json

{
    "cleanUrls": false
    ,
    "rewrites": [
        { "source": "/", "destination": "/index.html" }
    ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants