Currently, I have configured a file loader for .png files using esbuild.
Additionally, I have the following in my index.d.ts:
declare module "*.png" {
const value: string;
export default value;
}
One issue I am facing is that my code editor does not alert me of any non-existing imports.
import existing from "assets/existing.png" // no error
import not_existing from "assets/not_existing.png" // no error
The errors only surface once I actually build them with esbuild.
Is there a better way to handle this situation?