I am using Next.js (TS) + Tauri v2
It looks for files in a different path
main/src-tauri/target/debug/stuff2
instead of main/public/stuff2
src-tauri/tauri.conf.json
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "main",
"version": "0.1.0",
"identifier": "com.main.app",
"build": {
"beforeDevCommand": "npm run dev",
"devUrl": "http://localhost:3000",
"beforeBuildCommand": "npm run build",
"frontendDist": "../out"
},
"app": {
"withGlobalTauri": true,
"windows": [
{
"title": "main",
"width": 1280,
"height": 720,
"maximized": true
}
],
"security": {
"csp": null
}
},
"bundle": {
"active": true,
"targets": "all",
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/[email protected]",
"icons/icon.icns",
"icons/icon.ico"
],
"resources": [
"../public/stuff1/*",
"../public/stuff2/**/*"
]
}
}
src/tauri/capabilities/default.json
{
"$schema": "../gen/schemas/desktop-schema.json",
"identifier": "default",
"description": "Capability for the main window",
"windows": ["main"],
"permissions": [
"core:default",
"shell:allow-open",
"fs:allow-exists",
"fs:allow-read-file",
"fs:allow-write-file",
"fs:allow-read-dir",
{
"identifier": "fs:scope",
"allow": [
{ "path": "$APPDATA" },
{ "path": "$APPDATA/**" },
{ "path": "$APPLOCALDATA" },
{ "path": "$APPLOCALDATA/**" },
{ "path": "$APPCONFIG" },
{ "path": "$APPCONFIG/**" },
{ "path": "$RESOURCE" },
{ "path": "$RESOURCE/**" }
]
}
]
}