VSCode does not see the path to the video file and thus is not imported, and then does not show up in my react application. What could be the problem?
I checked whether the video was in the correct format, namely in webm, manually registered the import, but Vskod does not see the path to the file
import React from "react";
import video from "../../images/text.webm";
import Section from "../Section/Section";
const MainBanner = () => (
<Section>
<div className="container">[enter image description here](https://i.stack.imgur.com/AwrSo.png)
<h1 style={{ fontSize: 0, lineHeight: 0 }}>Oxxxymiron</h1>
<div className="banner">
<video
className="banner-video"
width={1000}
height="auto"
loop
muted
autoPlay
>
<source src={video} type="video/webm" />
</video>
</div>
</div>
</Section>
);
export default MainBanner;
This is probably a typescript thing not vscode.
There should be a file that ends with
.d.tsin your project. in there you should define what formats can be imported.Also if you are using webpack you must do some configurations there as well to tell webpack how to load those files.