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

fix: external URLs don't have to start with http(s) #17369

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

asivery
Copy link

@asivery asivery commented Jun 1, 2024

Description

Right now, when building, vite checks if the base provided is an external URL by checking if it starts with https:// or http://. This doesn't have to be the case. When working with electron, for example, one can create a custom protocol, then load the page with it. Right now setting the base to sandbox:// causes a broken app in electron. This PR fixes it.

Copy link

stackblitz bot commented Jun 1, 2024

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

@asivery asivery changed the title fix: External URLs don't have to start with http(s) fix: external URLs don't have to start with http(s) Jun 1, 2024
@DaveFlashNL
Copy link

yeah, cos an external url can also be a local file in electron right, so if it's hardcoded for http(s) it would break on 'file:///', right?

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

Successfully merging this pull request may close these issues.

None yet

2 participants