-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
Typescript pulling all MUI files - super slow compilation #11916
Comments
This is an issue with Typescript, not with MUI. There is nothing MUI can do about this |
May I ask you to expand a bit on that thought? Have you come across
something similar before?
…On Tue, 19 Jun 2018, 12:02 Rasmus Eneman, ***@***.***> wrote:
This is an issue with Typescript, not with MUI. There is nothing MUI can
do about this
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#11916 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHdk5-rU0KaHFNzTxM4-V9Oe4ZHcoT8oks5t-Mw3gaJpZM4UtG9x>
.
|
MUI only provides types for its components, it can not control how the TS compiler chooses to load and parse any files. It is a big library which is why you might see bigger impact from MUI than other libraries but it is big because it provides a lot of things, not because of an error. More clever loading of files, improved handling of many files etc. is up to the compiler. |
If this was the case for other people, then this repo would be swamped with people complaining about astronomical build times. It seems this is a fringe case. Maybe someone has come across this before... or can spot something with my config that I'm missing. |
I'm getting assistance on this issue: |
@Pajn import { StandardProps } from '..'; That import references the root |
First of all, just so it's clear. I'm not involved in MUI, I'm just a pretty active user of it. I was under the impression though that you still had to parse all distributed |
closing the issue, as it has been addressed. More details are in the ticket linked above. |
@rpmonteiro What did you do to fix this issue? |
@manpreetnarang instead of
Do this:
|
For anyone still having this issue with VS Code, I had to disable |
Expected Behavior
TSC should compile in about 3-8 seconds.
Current Behavior
TSC takes over 1 minute to compile, because it's pulling the entire library, with over half a million types.
running
tsc --extendedDiagnostics --listFiles --noEmit
and it goes on...
If I remove the MUI folder (resulting in lots of errors of course)
Context
I'm only using 10 components in the entire app, all imported like this:
import CircularProgress from '@material-ui/core/CircularProgress/CircularProgress';
It should only import the relevant files and types.
My tsconfig:
My @types folder:
Any ideas why this happens?
Thank you for your help!!!
Your Environment
The text was updated successfully, but these errors were encountered: