jaredpalmer / tsdx

Zero-config CLI for TypeScript package development
https://tsdx.io
MIT License
11.24k stars 508 forks source link

material-ui library development slow #934

Closed michael-land closed 3 years ago

michael-land commented 3 years ago

Anyone ideas how to speed up build when building component library on top of material-ui?

"peerDependencies": {
    "react": ">=16",
    "@emotion/core": "latest",
    "@emotion/styled": "latest",
    "@material-ui/core": "next",
    "@material-ui/icons": "next",
    "@material-ui/lab": "next"
  },
  "devDependencies": {
    "@emotion/core": "latest",
    "@emotion/styled": "latest",
    "@material-ui/core": "next",
    "@material-ui/icons": "next",
    "@material-ui/lab": "next",
}

Current Behavior

It takes about 90 seconds to build a simple material-ui component library image

Expected behavior

It should be faster

Suggested solution(s)

Additional context

Your environment

agilgur5 commented 3 years ago

Could you provide a minimal reproduction of this? Build time typically only grows with the size of your source code (especially if skipLibCheck is turned on, which seems to happen regardless for rpts2 per https://github.com/ezolenko/rollup-plugin-typescript2/issues/212) unless you've configured tsdx.config.js to bundle external dependencies. That being said, the --transpileOnly flag exists to speed up builds by skipping type-checking.

Your issue is also missing environment details, so it's unclear what version you're on. There have been several performance improvements in recent versions.

agilgur5 commented 3 years ago

Closing as stale