Answer the question
In order to leave comments, you need to log in
How to set up relative paths in webpack?
Hello . Please tell me, I raised the project through create react app and such a problem: I
inserted the video tag, specified the relative path to the video file in the src attribute, but it does not work. after some time found out that webpack changes the path
i.e.
the path import video from '../../img/video/mainstream.mp4'
it sees as Video /static/media/mainstream.bbae5fec.mp4
How to solve this problem ?
Answer the question
In order to leave comments, you need to log in
after some time found that webpack changes the path
i.e.
the path import video from '../../img/video/mainstream.mp4'
he sees as Video /static/media/mainstream.bbae5fec.mp4
<video src={require('../../img/video/mainstream.mp4')} />
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question