Android 9+ blocks cleartext HTTP by default. Enable usesCleartextTraffic so the emulator can reach the Journal dev server at http://10.0.2.2:3000. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
33 lines
866 B
TypeScript
33 lines
866 B
TypeScript
import { reactRouter } from "@react-router/dev/vite";
|
|
import { sentryVitePlugin } from "@sentry/vite-plugin";
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
import { defineConfig } from "vite";
|
|
import path from "node:path";
|
|
|
|
export default defineConfig({
|
|
build: {
|
|
sourcemap: "hidden",
|
|
},
|
|
plugins: [
|
|
tailwindcss(),
|
|
reactRouter(),
|
|
...(process.env.HTTPS === "1" ? [import("@vitejs/plugin-basic-ssl").then((m) => m.default())] : []),
|
|
sentryVitePlugin({
|
|
org: "trails-qq",
|
|
project: "journal",
|
|
release: { name: process.env.SENTRY_RELEASE },
|
|
sourcemaps: { filesToDeleteAfterUpload: ["./build/**/*.map"] },
|
|
disable: !process.env.SENTRY_AUTH_TOKEN,
|
|
telemetry: false,
|
|
}),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
"~": path.resolve(__dirname, "./app"),
|
|
},
|
|
},
|
|
server: {
|
|
port: 3000,
|
|
host: true,
|
|
},
|
|
});
|