mirror of
https://github.com/waku-org/waku-lab.git
synced 2025-02-13 08:16:52 +00:00
chore: remove base path
This commit is contained in:
parent
86f538e93e
commit
b5f4b16b58
@ -2,11 +2,10 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" type="image/svg+xml" href="/buddybook/favicon.svg" />
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||||
<link rel="icon" type="image/png" href="/buddybook/favicon.png" />
|
<link rel="icon" type="image/png" href="/favicon.png" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>BuddyBook Dogfood</title>
|
<title>BuddyBook Dogfood</title>
|
||||||
<base href="/buddybook/" />
|
|
||||||
<script>
|
<script>
|
||||||
window.global = window;
|
window.global = window;
|
||||||
window.process = {
|
window.process = {
|
||||||
@ -20,23 +19,11 @@
|
|||||||
browser: true
|
browser: true
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript">
|
|
||||||
(function(l) {
|
|
||||||
if (l.search[1] === '/' ) {
|
|
||||||
var decoded = l.search.slice(1).split('&').map(function(s) {
|
|
||||||
return s.replace(/~and~/g, '&')
|
|
||||||
}).join('?');
|
|
||||||
window.history.replaceState(null, null,
|
|
||||||
l.pathname.slice(0, -1) + decoded + l.hash
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}(window.location))
|
|
||||||
</script>
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
(function() {
|
(function() {
|
||||||
const path = window.location.pathname.substring('/buddybook/'.length);
|
const path = window.location.pathname;
|
||||||
if (path && !window.location.search.includes('?/')) {
|
if (path && !window.location.search.includes('?/')) {
|
||||||
window.location.replace('/buddybook/?/' + path + window.location.search + window.location.hash);
|
window.location.replace('/?/' + path + window.location.search + window.location.hash);
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
@ -4,12 +4,12 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>BuddyBook</title>
|
<title>BuddyBook</title>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var pathSegmentsToKeep = 1;
|
var pathSegmentsToKeep = 0;
|
||||||
|
|
||||||
var l = window.location;
|
var l = window.location;
|
||||||
l.replace(
|
l.replace(
|
||||||
l.protocol + '//' + l.hostname + (l.port ? ':' + l.port : '') +
|
l.protocol + '//' + l.hostname + (l.port ? ':' + l.port : '') +
|
||||||
l.pathname.split('/').slice(0, 1 + pathSegmentsToKeep).join('/') + '/?/' +
|
'/?/' +
|
||||||
l.pathname.slice(1).split('/').slice(pathSegmentsToKeep).join('/').replace(/&/g, '~and~') +
|
l.pathname.slice(1).split('/').slice(pathSegmentsToKeep).join('/').replace(/&/g, '~and~') +
|
||||||
(l.search ? '&' + l.search.slice(1).replace(/&/g, '~and~') : '') +
|
(l.search ? '&' + l.search.slice(1).replace(/&/g, '~and~') : '') +
|
||||||
l.hash
|
l.hash
|
||||||
|
@ -6,7 +6,7 @@ export default defineConfig(({ mode }) => {
|
|||||||
const env = loadEnv(mode, process.cwd(), '')
|
const env = loadEnv(mode, process.cwd(), '')
|
||||||
|
|
||||||
return {
|
return {
|
||||||
base: '/buddybook/',
|
base: '/',
|
||||||
plugins: [
|
plugins: [
|
||||||
react(),
|
react(),
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user