As a temporary workaround, since idl
files are simple .json
files you can bundle it within the web-app and load it with a simple:
import idl from "./testprogram.json";
...
new anchor.Program(idl, ...)
Edit:
Even better, you may copy the target/types/testprogram.ts
file into the app and import both the IDL and Contract type with:
import { Testprogram, IDL } from "./testprogram";