Skip to content

Can't import video #6822

@sandhilt

Description

@sandhilt

Is this a bug report?

I think so.

Did you try recovering your dependencies?

Yes.

Environment

$ yarn start

Steps to Reproduce

  1. Download any video in MP4 format and put in somewhere.
  2. Try import in some component:
import videoUrl from '../../videos/video.mp4';

const VideoItem = () => <video controls><source src={videoUrl} type='video/mp4' /></video>

export default VideoItem;

Expected Behavior

Page load asset like image do.

Actual Behavior

$ TypeScript error: Cannot find module  '../../videos/video.mp4'. TS2307

Comment

I think this is an problem from webpack, but how i can import without eject?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions