RecursiveThinking / recursive_thinking_website

Recursive Thinking Website
5 stars 2 forks source link

Webpack - Why does Webpack hate some .jpg(s)/.jpeg(s)? #100

Closed sethborne closed 6 years ago

sethborne commented 6 years ago

Bye, Bye Porg. Bye Bye!

amnevins commented 6 years ago

Youll be missed ... Porgo

MynockSpit commented 6 years ago

Gimme the deets.

sethborne commented 6 years ago

just that the porg_sq.jpeg doesn't load anymore.

we tried

porg_sq.jpg porgsq.jpg porgsq.png

none of them get included in the build

the odd thing is that only the porg_sq.jpeg is omitted. the other .jpg (banner.jpg) is included in the build just fine.

S

On Sat, Jun 30, 2018 at 11:25 PM Than Hutchins notifications@github.com wrote:

Gimme the deets.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/RecursiveThinking/recursive_thinking_website/issues/100#issuecomment-401586000, or mute the thread https://github.com/notifications/unsubscribe-auth/AWDqG4wVIjPa7FGHafidWuNqatashknYks5uCGtsgaJpZM4U-LiB .

MynockSpit commented 6 years ago

Ah... yeah... that's b/c images in the images folder don't get imported automatically. They have to be 'used' somewhere. In this case, 'used' means it's either referenced in the index.html file or imported into one of the .js files.

If you look in main.js, there's a bunch of imports for images. The only reason they exist is to tell webpack to bundle them.

MynockSpit commented 6 years ago

Actually, there's a strange behaviour we could hijack with webpack imports to import everything in the images folder...