- Create browser-ext/ with full extension code (MV3 manifest, background service worker, content script, popup, options page) - Add tRPC API client that communicates with unified monolith endpoints - Implement cache, settings, and phishing detection utilities - Create extension tRPC router in web app (getAuthStatus, linkDevice, reportPhishing) - Configure Vite build with manifest V3 support - Write unit tests for cache, phishing detector, and API client - All 20 tests passing, TypeScript lint clean
25 lines
654 B
TypeScript
25 lines
654 B
TypeScript
import { defineConfig } from "vite";
|
|
import { resolve } from "path";
|
|
import { fileURLToPath } from "url";
|
|
|
|
const __dirname = fileURLToPath(new URL(".", import.meta.url));
|
|
|
|
export default defineConfig({
|
|
build: {
|
|
outDir: "dist",
|
|
emptyOutDir: true,
|
|
rollupOptions: {
|
|
input: {
|
|
background: resolve(__dirname, "src/background/index.ts"),
|
|
content: resolve(__dirname, "src/content/index.ts"),
|
|
popup: resolve(__dirname, "src/popup/popup.html"),
|
|
options: resolve(__dirname, "src/options/options.html"),
|
|
},
|
|
output: {
|
|
entryFileNames: "[name].js",
|
|
},
|
|
},
|
|
},
|
|
publicDir: "public",
|
|
});
|