Skip to content

Commit abcdb45

Browse files
committed
allow local link
1 parent 83678ec commit abcdb45

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Diff for: vite.config.js

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
import { searchForWorkspaceRoot } from "vite";
2+
import fs from "node:fs";
3+
import path from "node:path";
4+
import { fileURLToPath } from 'node:url';
5+
6+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
7+
18
/** @type {import("vite").UserConfig} */
29
const config = {
310
// https://github.com/rerun-io/rerun/issues/6815
@@ -6,6 +13,16 @@ const config = {
613
},
714
server: {
815
port: 5173,
16+
17+
fs: {
18+
allow: [
19+
searchForWorkspaceRoot(process.cwd()),
20+
// NOTE: hack to allow `new URL("file://...")` in `web-viewer` when it is a linked package
21+
fs.realpathSync(
22+
path.join(__dirname, "node_modules", "@rerun-io/web-viewer"),
23+
),
24+
],
25+
},
926
},
1027
};
1128

0 commit comments

Comments
 (0)