{"record":{"id":"7f69ba0770fa22f8","repo":"tauri-apps/tauri","slug":"the-configured-frontenddist-is-the-src-tauri-fol","errorCode":null,"errorMessage":"The configured frontendDist is the `src-tauri` folder. Please isolate your web assets on a separate folder and update `tauri.conf.json > build > frontendDist`.","messagePattern":"The configured frontendDist is the `src-tauri` folder\\. Please isolate your web assets on a separate folder and update `tauri\\.conf\\.json > build > frontendDist`\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tauri-cli/src/build.rs","lineNumber":230,"sourceCode":"  if let Some(FrontendDist::Directory(web_asset_path)) = &config.build.frontend_dist {\n    if !web_asset_path.exists() {\n      let absolute_path = web_asset_path\n        .parent()\n        .and_then(|p| p.canonicalize().ok())\n        .map(|p| p.join(web_asset_path.file_name().unwrap()))\n        .unwrap_or_else(|| std::env::current_dir().unwrap().join(web_asset_path));\n      crate::error::bail!(\n        \"Unable to find your web assets, did you forget to build your web app? Your frontendDist is set to \\\"{}\\\" (which is `{}`).\",\n        web_asset_path.display(), absolute_path.display(),\n      );\n    }\n    if web_asset_path\n      .canonicalize()\n      .fs_context(\"failed to canonicalize path\", web_asset_path.to_path_buf())?\n      .file_name()\n      == Some(std::ffi::OsStr::new(\"src-tauri\"))\n    {\n      crate::error::bail!(\n          \"The configured frontendDist is the `src-tauri` folder. Please isolate your web assets on a separate folder and update `tauri.conf.json > build > frontendDist`.\",\n        );\n    }\n\n    // Issue #13287 - Allow the use of target dir inside frontendDist/distDir\n    // https://github.com/tauri-apps/tauri/issues/13287\n    let target_path = get_cargo_target_dir(&options.args, dirs.tauri)?;\n    let mut out_folders = Vec::new();\n    if let Ok(web_asset_canonical) = dunce::canonicalize(web_asset_path) {\n      if let Ok(relative_path) = target_path.strip_prefix(&web_asset_canonical) {\n        let relative_str = relative_path.to_string_lossy();\n        if !relative_str.is_empty() {\n          out_folders.push(relative_str.to_string());\n        }\n      }\n\n      for folder in &[\"node_modules\", \"src-tauri\"] {\n        let sub_path = web_asset_canonical.join(folder);","sourceCodeStart":212,"sourceCodeEnd":248,"githubUrl":"https://github.com/tauri-apps/tauri/blob/52e4b6e71d8632a7e648f866c442e287ecddee34/crates/tauri-cli/src/build.rs#L212-L248","documentation":"A guard against an obviously wrong `frontendDist`: after canonicalizing the path, if its final component is `src-tauri`, the CLI refuses to proceed. Serving the Rust project folder as web assets would bundle your source, Cargo.toml, and binaries into the app.","triggerScenarios":"Configuring `\"frontendDist\": \"../src-tauri\"` (or a path that canonicalizes to it) in `tauri.conf.json` and building.","commonSituations":"Confusing `frontendDist` with `devUrl` or with the tauri dir while editing config by hand; scaffolding tools or tutorials that leave a placeholder pointing at the project folder.","solutions":["Point `frontendDist` at your actual web build output, e.g. `\"../dist\"`","Keep web assets in a dedicated folder outside `src-tauri` and have your frontend bundler emit there"],"exampleFix":"// before (tauri.conf.json)\n\"build\": { \"frontendDist\": \"../src-tauri\" }\n\n// after\n\"build\": { \"frontendDist\": \"../dist\" }","handlingStrategy":"validation","validationCode":"# reject a frontendDist that resolves to src-tauri\nDIST=$(jq -r '.build.frontendDist' src-tauri/tauri.conf.json)\n[ \"$(basename \"$(cd \"src-tauri/$DIST\" 2>/dev/null && pwd)\")\" = \"src-tauri\" ] && { echo 'frontendDist must not be src-tauri' >&2; exit 1; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep web assets in a dedicated folder never inside `src-tauri`","Review `tauri.conf.json` diffs after using scaffolding tools or generators","Treat `frontendDist` as 'compiled web output only' — never as a project directory"],"tags":["tauri-cli","config","frontend-dist","build","misconfiguration"],"backgroundTag":"misconfigured-frontend-dist","analyzedSha":"52e4b6e71d8632a7e648f866c442e287ecddee34","analyzedAt":"2026-08-20T13:59:20.734Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}