Skip to content

Commit f99714a

Browse files
committed
Add missing files.
1 parent 1c1de76 commit f99714a

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"compilerOptions": {
3+
"target": "es6",
4+
"lib": ["dom", "dom.iterable", "esnext"],
5+
"allowJs": true,
6+
"skipLibCheck": true,
7+
"strict": true,
8+
"noEmit": true,
9+
"esModuleInterop": true,
10+
"module": "esnext",
11+
"moduleResolution": "bundler",
12+
"resolveJsonModule": true,
13+
"isolatedModules": true,
14+
"jsx": "preserve",
15+
"incremental": true,
16+
"paths": {
17+
"@/*": ["./src/*"]
18+
}
19+
},
20+
"exclude": ["node_modules"],
21+
"references": [
22+
{
23+
"path": "../../packages/powersync-sdk-web"
24+
}
25+
]
26+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import wasm from 'vite-plugin-wasm';
2+
import topLevelAwait from 'vite-plugin-top-level-await';
3+
import { fileURLToPath, URL } from 'url';
4+
5+
import { defineConfig } from 'vite';
6+
import react from '@vitejs/plugin-react';
7+
8+
// https://vitejs.dev/config/
9+
export default defineConfig({
10+
root: 'src',
11+
build: {
12+
outDir: '../dist',
13+
rollupOptions: {
14+
input: 'src/index.html'
15+
}
16+
},
17+
esbuild: {},
18+
resolve: {
19+
alias: [{ find: '@', replacement: fileURLToPath(new URL('./src', import.meta.url)) }]
20+
},
21+
publicDir: '../public',
22+
envDir: '..', // Use this dir for env vars, not 'src'.
23+
optimizeDeps: {
24+
// Don't optimize these packages as they contain web workers and WASM files.
25+
// https://github.com/vitejs/vite/issues/11672#issuecomment-1415820673
26+
exclude: ['@journeyapps/wa-sqlite', '@journeyapps/powersync-sdk-web'],
27+
include: ['object-hash', 'uuid', 'event-iterator', 'js-logger', 'lodash', 'can-ndjson-stream']
28+
},
29+
plugins: [wasm(), topLevelAwait(), react()],
30+
worker: {
31+
format: 'es',
32+
plugins: () => [wasm(), topLevelAwait()]
33+
}
34+
});

0 commit comments

Comments
 (0)