Skip to content

Commit f9e08d8

Browse files
committed
Added
1 parent 789910a commit f9e08d8

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

docs/tsconfig.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ES2020",
4+
"useDefineForClassFields": true,
5+
"module": "ESNext",
6+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
7+
"skipLibCheck": true,
8+
9+
/* Bundler mode */
10+
"moduleResolution": "bundler",
11+
"allowImportingTsExtensions": true,
12+
"resolveJsonModule": true,
13+
"isolatedModules": true,
14+
"noEmit": true,
15+
16+
/* Linting */
17+
"strict": true,
18+
"noUnusedLocals": true,
19+
"noUnusedParameters": true,
20+
"noFallthroughCasesInSwitch": true
21+
},
22+
"include": ["src"]
23+
}

docs/vite.config.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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+
8+
/** @type {import("vite").UserConfig} */
9+
const config = {
10+
// https://github.com/rerun-io/rerun/issues/6815
11+
optimizeDeps: {
12+
exclude: process.env.NODE_ENV === "production" ? [] : ["@rerun-io/web-viewer"],
13+
},
14+
server: {
15+
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+
},
26+
},
27+
};
28+
29+
// Support deployment to GitHub Pages
30+
if ("REPOSITORY" in process.env) {
31+
config.base = `/${process.env.REPOSITORY}/`;
32+
}
33+
34+
export default config;

0 commit comments

Comments
 (0)