A React component for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia and DailyMotion
I am developing a Django application that integrates React.js for front-end purposes. I have this specific section on a page that has to display a video element of a Youtube livestream.
main.bundle.min.js:129 GET http://192.168.10.182:8000/vendors~reactPlayerYouTube.bundle.min.js net::ERR_ABORTED 404 (Not Found)
Expected Behavior
vendors~reactPlayerYoutube.bundle.min.js should be fetched from http://<site>/static/ since 'static' is a folder inside my Django app that serves as an assets folder. This is where my assets are located (js, css, and even my react compiled .js file main.bundle.min.js)
To try to resolve, I copied vendors~reactPlayerYouTube.bundle.min.js to this static folder but still the error is there because it expects these files in http://<site>/ and not http://<site>/static/
Steps to Reproduce
create Django app and configure to point assets to a 'static' folder
create React app alongside Django app, use webpackand configure it to compile bundles inside dist-dev in React project root (copy webpack config script below).
configure package.json to run scripts that copy bundle files to your Django static folders (copy package.json script below).
Current Behavior
I am developing a Django application that integrates React.js for front-end purposes. I have this specific section on a page that has to display a video element of a
Youtube livestream
.When I run my web app, I get this error
main.bundle.min.js:106 Uncaught ChunkLoadError: Loading chunk vendors~reactPlayerYouTube failed
main.bundle.min.js:129 GET http://192.168.10.182:8000/vendors~reactPlayerYouTube.bundle.min.js net::ERR_ABORTED 404 (Not Found)
Expected Behavior
vendors~reactPlayerYoutube.bundle.min.js
should be fetched fromhttp://<site>/static/
since 'static' is a folder inside my Django app that serves as an assets folder. This is where my assets are located (js, css, and even my react compiled .js file main.bundle.min.js)To try to resolve, I copied
vendors~reactPlayerYouTube.bundle.min.js
to this static folder but still the error is there because it expects these files inhttp://<site>/
and nothttp://<site>/static/
Steps to Reproduce
webpack
and configure it to compile bundles insidedist-dev
in React project root (copy webpack config script below).package.json
to run scripts that copy bundle files to your Django static folders (copy package.json script below).npm run dev
http://<django-server-ip>
Environment
Other Information
webpack config dev mode
package.json (remove plugins you dont need)
React component