Compiler Inspector
The Compiler Inspector compares the code Vue and Vize generate from the same .vue file. Use it to
narrow a problem such as "this template changes the output" or "the SSR result looks wrong" down to a
small reproduction. It also shows the generated virtual TypeScript, VIR (Vize's intermediate
representation), and the dependencies between files.
Open the Compiler Inspector in the Playground. When you share a reproduction, follow Testing & Feedback.
https://vizejs.dev/play/?tab=inspector
Compare the output
- Paste the
.vuefile that shows the problem. Remove unrelated code and styles while the problem still reproduces. - Pick the output to inspect: DOM for client code, SSR for server code, or Vapor. Match the template syntax mode and renderer settings you used when the problem happened.
- Find differing lines in the compare tab, then read the surrounding code in each output tab. A difference in generated code is not always a bug; check how it changes what renders or runs.
- Once the reproduction is small, copy the permalink. Testing & Feedback lists what to include in a report.
The browser shows:
- the code generated by the official
@vue/compiler-sfcand by Vize WASM - the virtual TypeScript that
vize checktype-checks, and VIR, for the selected file - the cross-file graph and line diff, built the same way as the CLI so terminal reports match
- diagnostics from the relationships between the loaded files
- DOM, SSR, and Vapor targets, plus custom renderer and template syntax mode controls
- full output from both compilers and a compare view of lines only one of them produces
- a permalink to the same reproduction and a prefilled pull request link
Load a local reproduction
When the reproduction already exists in a local project, use vize inspector. A single file prints a
Playground URL by default:
vize inspector src/App.vue
For problems that need several files, such as a parent and child component, pass a directory or a glob. The sources are bundled into one payload and you can switch between files in the Playground. Quote globs so the shell does not expand them first.
vize inspector src/components
vize inspector "src/**/*.vue" --target ssr
For large batches, save JSON instead of a long URL:
vize inspector "src/**/*.vue" --format json --output inspector-payload.json
To hand the investigation to an AI agent, emit the agent report. It contains the payload, the Playground URL, summary metrics, and the cross-file graph.
vize inspector "src/**/*.vue" --format agent --output inspector-agent.json
In a development checkout, the CLI can also compare compilers directly. It uses the Rust compiler in
the running binary and @vue/compiler-sfc from the project or the Vize workspace node_modules.
vize inspector "src/**/*.vue" --format compare --output inspector-compare.json
The compare format needs Vue 3's @vue/compiler-sfc or vue/compiler-sfc and does not support Vue 2
or Nuxt 2 projects. Use json or agent to extract a reproduction without running the official
compiler.
The CLI and the Playground build the payload, graph, and line diff the same way, so a terminal report matches what the browser shows. The official Vue compiler always runs in the browser.
Useful options:
| Option | Description |
|---|---|
--target dom |
Compare VDOM compiler output |
--target ssr |
Compare SSR compiler output |
--target vapor |
Compare Vapor compiler output |
--format agent |
Emit agent-readable JSON with graph metadata |
--format compare |
Run the development-only CLI comparison |
--custom-renderer |
Enable custom renderer mode in the playground |
--template-syntax |
Choose standard, strict, or quirks |
--max-files <n> |
Limit the number of files in a batch payload |
--playground-url |
Override the playground URL used for links |
Share a fix for review
For a pull request that fixes a compiler difference, put the inspector permalink in the description
and add the smallest fixture or a full snapshot so CI shows the output change. The inspector's pull
request link prefills the reproduction; after pushing your branch, pick the target branch as base
and your branch as compare if GitHub asks.
Include:
- the inspector permalink
- the selected target and options
- the minimized
.vuefixture or full snapshot - relevant virtual TypeScript, VIR, or graph context when the fix spans several compiler stages
- why Vize's output should match Vue's, or why it intentionally differs
- the local command that verifies the changed compiler stage