Skip to content

Commit 093eb0e

Browse files
authored
Merge pull request #78 from permaweb/fix/bundling-merge-issues
fix: bundling issues after merge
2 parents d890a81 + db74482 commit 093eb0e

File tree

2 files changed

+14
-18
lines changed

2 files changed

+14
-18
lines changed

index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
5+
<script>
6+
(function () {
7+
const path = window.location.pathname || '/';
8+
const basePath =
9+
path === '/'
10+
? '/'
11+
: /\.[^/]+$/.test(path)
12+
? path.replace(/[^/]*$/, '') || '/'
13+
: `${path.replace(/\/+$/, '')}/`;
14+
const base = document.createElement('base');
15+
base.href = basePath;
16+
document.head.appendChild(base);
17+
})();
18+
</script>
519
<link rel="icon" href="favicon.svg" />
620
<link rel="manifest" href="manifest.json" />
721
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

vite.config.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -67,24 +67,6 @@ export default defineConfig(({ mode }) => {
6767
emptyOutDir: true,
6868
rollupOptions: {
6969
plugins: [polyfillNode()],
70-
output: {
71-
manualChunks: (id: string) => {
72-
if (id.includes('react') || id.includes('react-dom') || id.includes('react-router-dom')) {
73-
return 'vendor';
74-
}
75-
if (id.includes('@permaweb/aoconnect')) {
76-
return 'ao-connect';
77-
}
78-
if (id.includes('arweave')) {
79-
return 'arweave';
80-
}
81-
if (id.includes('react-markdown') || id.includes('katex') || id.includes('marked')) {
82-
return 'markdown';
83-
}
84-
85-
return undefined;
86-
},
87-
},
8870
},
8971
},
9072
server: {

0 commit comments

Comments
 (0)