-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Export test-utils from compat #4783
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export test-utils from compat #4783
Conversation
📊 Tachometer Benchmark ResultsSummaryA summary of the benchmark results will show here once they finish. ResultsThe full results of your benchmarks will show here once they finish. |
|
This should already be aliased for you with the Vite preset: https://github.com/preactjs/preset-vite/blob/243a8f0f6c8235e6c01f8f0cce791350dfd0796b/src/index.ts#L273 Not that I'm against this, though I think we need to make a decision what should be aliases and what should be export paths (separate from this PR of course). |
|
@rschristian it does not seem to work in storybook at least. I suppose it could be considered a bug with storybook, but I personally think
cd into project then run the project, you will get something like this: |
Yeah I think that's fair, those aliasing instructions were written before |
|
Cheers! |
|
@rschristian do you have any idea on when this will be released? Is it a v10 or v11 thing? |
|
It's not a breaking change, it'll go out next time we make a v10 release. No ETA on that though. |
Hello!
react-domexports test-utils asreact-dom/test-utils(https://github.com/facebook/react/blob/d742611ce40545127032f4e221c78bf9f70eb437/packages/react-dom/package.json#L113C5-L113C39)since it is very common to resolve
reactandreact-domtopreact/compatthe fact thatpreact/compat/test-utilsisn't a valid export can break some things.I noticed this trying to run storybook preact. Storybook Vite lists
'react-dom/test-utils'as anoptimizeDependencycandidate. Since this ultimately tries to get resolved aspreact/compat/test-utilsit breaks.