-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Fix Icon import in React #68
Conversation
I don't think this is a valid change. 🤔 Are you personally experiencing issues importing the
|
I've setup a sample repo here: Deployed here: https://hugogresse.github.io/material-icon-vite-import-bug/ I've not digged down into it but the sample only use Vite + TS + mdi package which should be a lot of project I guess. No specific setup for vite except the base path for the github pages, directly raw project. |
https://github.com/Templarian/MaterialDesign-React/blob/master/dist/Icon.d.ts#L5 Looking at the source code for the dist folder for the https://github.com/Templarian/MaterialDesign-React-Demo/blob/master/src/index.js <- The demo site for instance. I haven't looked closely at repo that @HugoGresse put up, but my guess it's a configuration issue. |
I've pulled this repo down, installed, and A quick Google search immediately led me to vitejs/vite#4704, which is closed as a duplicate of vitejs/vite#2139, showing that this is a configuration problem with Vite. It seems someone has a workaround on this comment. Since this isn't a problem on our side of things, I'm going to close this and the other related PRs and issues. Best of luck figuring out things with Vite! |
thanks for digging into this, sorry for the noise! |
Proposed Changes
This PR fix a bug happing in production build where the
<Icon />
is React was not imported correctly resulting in this error:Source: https://reactjs.org/docs/error-decoder.html/?invariant=130&args[]=object&args[]=
Types of Changes
What types of changes does your code introduce?
Checklist
Additional Information
Linked issue and PR: