Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

Corrupted images emitted #205

Closed
slavafomin opened this issue Sep 29, 2017 · 6 comments
Closed

Corrupted images emitted #205

slavafomin opened this issue Sep 29, 2017 · 6 comments

Comments

@slavafomin
Copy link

Hello!

Thank you for your hard work!

However, when I'm trying to use the file-loader to import JPG image, the corrupted file is emitted instead. I've set up a minimal repository here: https://github.com/slavafomin/webpack-file-loader-corrupts-images.

I'm not sure if I'm doing something wrong or if something is actually broken. I was just following the webpack getting started guide.

When comparing the two files with hexdiff I can say that entire file is partially overwritten and the corrupt file is ~ two times longer.

What could be the reason for this? Thanks!

@michael-ciniawsky
Copy link
Member

michael-ciniawsky commented Sep 29, 2017

Which version of file-loader are you using ? >= v1.x.x ? If that's the case revert to =< 0.11.2 for now. There's a know bug in v1.x.x atm (#183)

@slavafomin
Copy link
Author

All actual dependencies used are in the yarn.lock of the attached repository:
https://github.com/slavafomin/webpack-file-loader-corrupts-images/blob/master/yarn.lock

I'm using latest stable version of the file-loader, which is 1.1.0 as suggested in the getting started guide. I will try to install the suggested version and will get back to you.

@michael-ciniawsky
Copy link
Member

Try v1.1.3 (@latest) npm i -D file-loader or npm i -D file-loader@0.11.2, the getting started guide won't help you here :)

@slavafomin
Copy link
Author

I've downgraded to 0.11.2 and I can confirm that it's working correctly.

This looks crazy as webpack is such a popular system and it's basic functionality is broken in STABLE branch, so any new user can't even complete the getting started guide. And there is no even a tiny notice about this anywhere. I can't even comprehend what a confusing experience this could be for a new users.

@slavafomin
Copy link
Author

Oh, it looks like it's also working in latest v1.1.3, which was released couple of hours ago. But still, such a critical problem in stable branch looks frightening. Aren't there any tests for this?

@michael-ciniawsky
Copy link
Member

There are but this particular issue originated from a build error during postinstall transpilation and therefore wasn't catched by the CI

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants