Case insensitivity causes builds to fail when run on another platform
See original GitHub issueDo you want to request a feature or report a bug?
Feature, though if you squint at it, it looks like a bug.
What is the current behavior?
If a user is building their application on a Windows machine and requiring a file with a case mismatch, the build will succeed. Ex:
import foo from 'longCamelCasedFilename.js'
when the file on disk is actually longCamelCasedFileName.js
. Now when they try to deploy to a service which builds the project for them on a case-sensitive file system the build will complain about the module being missing.
What is the expected behavior?
Forcing case-sensitive matches would probably break too many people, but it would be better if webpack warned the user when the case of the imported file doesn’t actually match the case of the import statement.
If this is a feature request, what is motivation or use case for changing the behavior?
This is a fairly frequent source of support tickets at Heroku, because it leads customers to believe that the service is buggy. “Works on my machine”
Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.
cc @hone
Issue Analytics
- State:
- Created 6 years ago
- Reactions:15
- Comments:20 (9 by maintainers)
Bot can’t kill this. This is still happening and a serious issue in deployments for all our products. Please update this in future version.
In docker and kubernetes instances we use base images, where this is failing.
We used this plugin, after a while our project grown and this plugin takes a lot of build time. I don’t advice it.
The better solution could be when Webpack is resolving the path check them to make sure it is correct in terms of case-sensitivity.