Vue
If your Vue app uses Vite, integrate Interceptor through the Vite plugin.
Install
bash
pnpm add -D @wrkspace-co/interceptorConfigure
ts
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import { interceptorVitePlugin } from "@wrkspace-co/interceptor/vite";
export default defineConfig({
plugins: [
vue(),
interceptorVitePlugin({
configPath: "interceptor.config.ts"
})
]
});Notes
- The plugin loads
.envfrom your project root. - Vue SFCs are scanned across
<script>,<template>, and<i18n>blocks. - Interceptor outputs flat JSON keys, so set
flatJson: trueincreateI18nif you use dotted keys.