#Help using sound files in my webpack

1 messages · Page 1 of 1 (latest)

stone jewel
#

I cannot for the life of me figure out how to use a sound file without getting an error... best I can tell, it isn't taking the file into main_window.

shut anchor
#

error?

stone jewel
shut anchor
#

and what path?

stone jewel
shut anchor
#

and what path in request?

stone jewel
#

?

shut anchor
#

you have requests in network tab

stone jewel
#

http://localhost:3000/extraResources/EarTickle.mp3

shut anchor
#

your server have this file?

stone jewel
#

I think?

shut anchor
#

its path in project folder

#

but your web server dont know about it

stone jewel
#

so how do I let it?

shut anchor
#

correctly config web server

stone jewel
#

lead the way

shut anchor
#

i dont know what server you have

#

and i cant help you with webpack sorry

stone jewel
#

okay, thank you for getting me this far

#

Help using sound files in my webpack

analog raptor
#

rules ```js
{
test: /.(png|jpe?g|gif|mp3)$/i,
loader: 'file-loader', // npm install file-loader --save-dev
options: {
outputPath: 'extraResources',
publicPath: '../extraResources',
name: '[path][name].[ext]',
}
},

stone jewel
#

not quite... same error

#

is there anything i have to do with js to import it?

#

hmmmm

#

in main.js

#

BUT

#

it puts it into the wrong folder

stone jewel
#

I love you, thank you!

#

will post solution tomorrow