-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
Alpha release breaks snowpack build #26568
Comments
Thanks for the report. I can no longer reproduce the issue with |
@eps1lon It seems like it works fine in the prod build.
But |
Thanks for the confirmation. Going to close this until there's something actionable for us to do. Until then I would defer to snowpack to fixing this issue. I don't think any other bundler has this particular issue. |
@eps1lon This is a response from @drwpow in the snowpack thread FredKSchott/snowpack#3004 (comment)
Is this something actionable? Adding the exports/guidelines as suggested? |
Since this will take a lot of time to get right and implements no new features other than new bundlers saying "we don't want to implement the old behavior", we're not prioritizing this. We ship a lot of components, with a lot of subpaths and it's yet another thing we have to maintain since |
I can respect not wanting to ship a change that adds maintenance, and potential bugs. But if it makes it any easier, wildcard exports (
That’s not really Snowpack’s stance, at least. The reality is that there is no official “old behavior” for ESM to even implement, as - import Button from '@material-ui/core/Button'; // CJS
+ import Button from '@material-ui/core/esm/Button/Button.js'; // ESM option 1: direct path
+ import { Button } from '@material-ui/core'; // ESM option 2: leveraging "module" Really this comes down to either educating users how to import ESM vs CJS (docs), or doing it automatically for them (package exports). Either will work! But something has to change if a user is following the docs but wants ESM. |
Which are not the semantics we document. That is the problem here. We would just further confuse people because external tools parse the
https://nodejs.org/api/modules.html#modules_all_together looks official enough for me.
I'm very pragmatic here. webpack 4, 5, nextjs, create-react-app, rollup, gatsby all just work right now. If snowpack wants to take the technical purity route, then more power to them. But the work required to be technically pure, while also maintaining backwards compat and not creating more issues, is not something that we have the bandwidth at the moment. We do want to get this right eventually. But right now the ecosystem is just not ready. And if I have to choose between snowpack and nextjs, I'll have to choose nextjs. |
Current Behavior 😯
Material UI 5.0.0-alpha.35 breaks SnowPack and throws error:
SyntaxError: indirect export not found: SliderMark
See discussion in FredKSchott/snowpack#3004 for details. Particularly comments: FredKSchott/snowpack#3004 (comment), FredKSchott/snowpack#3004 (comment), FredKSchott/snowpack#3004 (comment)
latest stable version of material-ui (4.11.4) seems to be working fine. So i was thinking maybe it would be easy to isolate what the problem is if I opened a bug report here.
Expected Behavior 🤔
MaterialUI should be able to work with SnowPack without issues.
Steps to Reproduce 🕹
Steps:
Context 🔦
I am trying to test out the new styled solution provided in mui 5 using emotion so was taking a look at the latest alpha release and ran into this issue.
Your Environment 🌎
`npx @material-ui/envinfo`
The text was updated successfully, but these errors were encountered: