histoire-dev / histoire

⚡ Fast and beautiful interactive component playgrounds, powered by Vite
https://histoire.dev
MIT License
3.03k stars 174 forks source link

fix: revert "fix: Fix sandbox URL in getSandboxUrl function" #698

Closed Mobyrr closed 2 months ago

Mobyrr commented 2 months ago

Reverts histoire-dev/histoire#652

Description

Fix stories in iframes not showing when the base have a slash at the end.

Additional context

The base url should have a slash at the start and at the end (every guides for configuring the base url have them, for example : https://vitejs.dev/config/shared-options.html#base)

If the base doesn't have the slash at the end, the build produce a bad result, it doesn't find js and css files because a slash is missing in the urls

stackblitz[bot] commented 2 months ago

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

codesandbox[bot] commented 2 months ago

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders
Open Preview

netlify[bot] commented 2 months ago

Deploy Preview for histoire-site ready!

Name Link
Latest commit fd707039a0dd3a286191557a04ec7543ffed6ac6
Latest deploy log https://app.netlify.com/sites/histoire-site/deploys/65eecea5dbf62f0008cbebea
Deploy Preview https://deploy-preview-698--histoire-site.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] commented 2 months ago

Deploy Preview for histoire-controls ready!

Name Link
Latest commit fd707039a0dd3a286191557a04ec7543ffed6ac6
Latest deploy log https://app.netlify.com/sites/histoire-controls/deploys/65eecea5840a4d00086a8e48
Deploy Preview https://deploy-preview-698--histoire-controls.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] commented 2 months ago

Deploy Preview for histoire-examples-svelte3 ready!

Name Link
Latest commit fd707039a0dd3a286191557a04ec7543ffed6ac6
Latest deploy log https://app.netlify.com/sites/histoire-examples-svelte3/deploys/65eecea5cee527000878e6aa
Deploy Preview https://deploy-preview-698--histoire-examples-svelte3.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] commented 2 months ago

Deploy Preview for histoire-examples-vue3 ready!

Name Link
Latest commit fd707039a0dd3a286191557a04ec7543ffed6ac6
Latest deploy log https://app.netlify.com/sites/histoire-examples-vue3/deploys/65eecea5df36fa00089a9f04
Deploy Preview https://deploy-preview-698--histoire-examples-vue3.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Akryum commented 2 months ago

After looking around (for example in vitepress), Vite's base should be concatenated as-is like it was before the referenced PR.