Skip to content

Commit a938a87

Browse files
authored
Add basepath to URL and strip _build (#90)
1 parent 0c51d7d commit a938a87

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

apps/class-solid/src/components/ShareButton.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ export function ShareButton() {
2929
}
3030

3131
const appState = encodeAppState(experiments, analyses);
32-
const url = `${window.location.origin}#${appState}`;
32+
const basePath = import.meta.env.DEV
33+
? ""
34+
: import.meta.env.BASE_URL.replace("/_build", "");
35+
const url = `${window.location.origin}${basePath}#${appState}`;
3336
return url;
3437
});
3538

0 commit comments

Comments
 (0)