Rust implementation of NextGraph, a Decentralized and local-first web 3.0 ecosystem
https://nextgraph.org
byzantine-fault-tolerancecrdtsdappsdecentralizede2eeeventual-consistencyjson-ldlocal-firstmarkdownocapoffline-firstp2pp2p-networkprivacy-protectionrdfrich-text-editorself-hostedsemantic-websparqlweb3collaboration
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.4 KiB
41 lines
1.4 KiB
import tailwindcss from "@tailwindcss/vite";
|
|
import { defineConfig } from "vite";
|
|
import { svelte } from "@sveltejs/vite-plugin-svelte";
|
|
|
|
const host = process.env.TAURI_DEV_HOST;
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [tailwindcss(), svelte()],
|
|
// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
|
|
//
|
|
// 1. prevent Vite from obscuring rust errors
|
|
clearScreen: false,
|
|
// 2. tauri expects a fixed port, fail if that port is not available
|
|
server: {
|
|
port: 5173,
|
|
strictPort: true,
|
|
host: host || false,
|
|
hmr: host
|
|
? {
|
|
protocol: "ws",
|
|
host,
|
|
port: 1421
|
|
}
|
|
: undefined,
|
|
watch: {
|
|
// 3. tell Vite to ignore watching `src-tauri`
|
|
ignored: ["**/src-tauri/**"]
|
|
}
|
|
},
|
|
// Env variables starting with the item of `envPrefix` will be exposed in tauri's source code through `import.meta.env`.
|
|
envPrefix: ["VITE_", "TAURI_ENV_*"],
|
|
build: {
|
|
// Tauri uses Chromium on Windows and WebKit on macOS and Linux
|
|
target: process.env.TAURI_ENV_PLATFORM == "windows" ? "chrome105" : "safari13",
|
|
// don't minify for debug builds
|
|
minify: !process.env.TAURI_ENV_DEBUG ? "esbuild" : false,
|
|
// produce sourcemaps for debug builds
|
|
sourcemap: !!process.env.TAURI_ENV_DEBUG
|
|
}
|
|
});
|
|
|