[docs-infra] Fix broken sandboxes with relative module imports
Netlify deploy preview
https://deploy-preview-42767--material-ui.netlify.app/
Bundle size report
No bundle size changes (Toolpad) No bundle size changes
Generated by :no_entry_sign: dangerJS against f2ff725b9525d509573b9ab4b31dc8202d710eed
@bharatkashyap I created #43145 fro mexperimental purpose.
My concern with the current solution is that you take into consideration that imports are from ./xxx which is not always the case. In MUI X we have two case where we could need deeper imports.
For example the tree-view is looking to define 2 or 3 datasets to reuse every where. So they would likely have path like ../datasets/products.json Same for the charts that might have more data sets but that could be shared across multiple pages (and so multiple folders)
In the PR, I propose to respect the file splitting in the generated codesandbox, but move all the files at the same level.
[docs-infra][Do not merge] Fix broken sandboxes with relative module imports #43145
Thanks @alexfauquette for this! Your proposal makes sense to me; thanks for bringing to light this oversight :)
I've replace the package-lock by the current one
The demo seems to work nice on both codesandbox and stackblitz :+1: https://deploy-preview-42767--material-ui.netlify.app/material-ui/react-autocomplete/#combo-box