How to load a local video in React using webpack?
问题 I can't seem to figure out how to get an html5 video to render in a react app from local files. Literally the only way I've been able to get this to work is like this: <video src="http://www.w3schools.com/html/movie.mp4" controls /> Here's what I've tried 1. Including the path directly <video src={require('path/to/file.mp4')} controls /> which returns an error Module parse failed: /path/to/file.mp4 Line 1: Unexpected token ILLEGAL You may need an appropriate loader to handle this file type. 2