Skip to content

Conversation

amoshydra
Copy link
Contributor

Change file-loader esModule option to false

Resolve #2613

@gauravtiwari gauravtiwari merged commit 35b6ae3 into rails:master Aug 8, 2020
@aried3r
Copy link
Contributor

aried3r commented Aug 8, 2020

@gauravtiwari
Copy link
Member

Yes, I did, thank you.

I think at the moment it's pretty much static files: https://github.com/rails/webpacker/blob/master/lib/install/config/webpacker.yml#L21 so for general usage lets make it default to false.

I believe a lot of people would run this problem but happy to look into a simple configurable solution later.

@renchap
Copy link
Contributor

renchap commented Aug 24, 2020

This is a breaking change and should have been in a major version, or at least documented in the changelog.

If you used for example require("./file.svg").default to get the path of a SVG file, this changes your path to be undefined, and images to be empty if you used it like <img src=…>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

esModule file-loader compat

4 participants