I am trying to create a music player that will simply play a mp3 file.
I do not know how to serve the mp3 file through webpack to the Audio Element constructor. I have set up a file-loader for mp3 files in webpack. Providing the relevant url to the mp3 file won't work, as will not trying to "import" the mp3 file and passing it to the constructor.
I don't seem to be able to find good documentation of the Audio Element or how webpack is supposed to handle audio files.
My file structure for this page:
homePage: {
player.js,
homePage.js,
template.html,
intro.mp3}
in player.js:
webpack mp3 setup: