'How to fix the Cannot find module mp3 file or its corresponding type declarations
Solution 1:[1]
Inside the src/react-app-env.d.ts add this:
/// <reference types="react-scripts" />
declare module '*.mp3'; // '*.wav' if you're using wav format
Now you can use it like this:
import audio1 from './audio/audio.mp3';
const myAudio = new Audio(audio1);
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |

