Is your proposal related to a problem?
I am working in a create-react-app project that for reasons out of my control uses symlinks. This is particularly causing problems with Jest since it's file-finding library ( I think jest-haste-map) doesn't support symlinks without additional configuration.
With pure jest, there is a configuration haste.enableSymlinks which I could potentially use to work around this. For create-react-app, I went ahead and tried configuring it in the package.json:
"jest": {
"haste": {
"enableSymlinks": true
}
},
and got back the following error message
Out of the box, Create React App only supports overriding these Jest options:
• clearMocks
• Many others listed....
These options in your package.json Jest configuration are not currently supported by Create React App:
• haste
If you wish to override other Jest options, you need to eject from the default setup. You can do so by running npm run eject but remember that this is a one-way operation. You may also file an issue with Create React App to discuss supporting more options out of the box.
Describe the solution you'd like
Is there any way we could allow CRA to support Jest's haste rule or at least haste.enableSymlinks. I have been using and working with react-scripts for most of our pipelines, but this one issue with symlinks is forcing me to either do an eject or to do something more manual (configure my own jest). In other words, I feel like I'm bending over backwards to workaround this one issue.
Describe alternatives you've considered
Say that configuring haste from CRA is too problematic or difficult and that people dealing with symlinks need to eject or configure their own testing pipeline. I'm not against this, I truly don't know how easy/complicated this request is.
Additional context
If you're wondering why I have symlinks, it is because I'm using react-scripts with Google's Bazel.
Is your proposal related to a problem?
I am working in a create-react-app project that for reasons out of my control uses symlinks. This is particularly causing problems with Jest since it's file-finding library ( I think jest-haste-map) doesn't support symlinks without additional configuration.
With pure jest, there is a configuration
haste.enableSymlinkswhich I could potentially use to work around this. For create-react-app, I went ahead and tried configuring it in the package.json:and got back the following error message
Describe the solution you'd like
Is there any way we could allow CRA to support Jest's
hasterule or at leasthaste.enableSymlinks. I have been using and working with react-scripts for most of our pipelines, but this one issue with symlinks is forcing me to either do an eject or to do something more manual (configure my own jest). In other words, I feel like I'm bending over backwards to workaround this one issue.Describe alternatives you've considered
Say that configuring haste from CRA is too problematic or difficult and that people dealing with symlinks need to eject or configure their own testing pipeline. I'm not against this, I truly don't know how easy/complicated this request is.
Additional context
If you're wondering why I have symlinks, it is because I'm using react-scripts with Google's Bazel.