I have a Storybook that works locally, but when serving the static site, it complains about the mimetype of my .mjs files. As such, I am unable to serve my Storybook in CI. I saw this referenced in another issue, so it is apparently a known issue.
I'm seeing the following when trying to access a storybook instance deployed via a CI pipeline:
Strangely, I see different issues when building / serving locally with npx http-server ./storybook-static:
Again, this works fine when running the dev server locally
To Reproduce
Build storybook locally and serve with npx http-server ./storybook-static
Describe the bug
I have a Storybook that works locally, but when serving the static site, it complains about the mimetype of my
.mjs
files. As such, I am unable to serve my Storybook in CI. I saw this referenced in another issue, so it is apparently a known issue.I'm seeing the following when trying to access a storybook instance deployed via a CI pipeline:
Strangely, I see different issues when building / serving locally with
npx http-server ./storybook-static
:Again, this works fine when running the dev server locally
To Reproduce
Build storybook locally and serve with
npx http-server ./storybook-static
System
Additional context
My
vite.config.ts
:My
.storybook/main.ts
: