material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

[core] Only define aliases once for TypeScript and once for Webpack + Babel

Open flaviendelangle opened this issue 2 years ago • 1 comments

Goals

  1. Define the path leading to the packages in as little places as possible to avoid missing aliases and make the architecture easier to understand.
  2. Reduce our usage of babel.config.js for the doc to hopefully one day be able to use SWC (other plugins already have issues like https://github.com/oliviertassinari/babel-plugin-transform-react-remove-prop-types/issues/201 or https://github.com/swc-project/swc/discussions/6057)

Side note

  • @mui/docs and modules contains almost nothing, maybe we could reduce the amount of aliases (and therefore make the overall architecture easier to understand) in the future.

flaviendelangle avatar Nov 18 '22 14:11 flaviendelangle

Netlify deploy preview

https://deploy-preview-35197--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad) No bundle size changes

Generated by :no_entry_sign: dangerJS against ac3878de80f17beff444cf3b01d19b8ac162b34d

mui-bot avatar Nov 18 '22 14:11 mui-bot

@flaviendelangle Could you recheck again?

siriwatknp avatar May 16 '23 02:05 siriwatknp

@flaviendelangle Do you have an idea which specific build/test/lint flows break when we remove the babel aliasing? Just for me to know what makes sense to concentrate on next in code infra?

Janpot avatar Sep 21 '23 11:09 Janpot

@flaviendelangle Do you have an idea which specific build/test/lint flows break when we remove the babel aliasing? Just for me to know what makes sense to concentrate on next in code infra?

I did not test it in a long time but I'd say the doc building scripts should breaking

flaviendelangle avatar Sep 21 '23 11:09 flaviendelangle

@flaviendelangle Just stumbled upon this PR again and realized it has been superseded by https://github.com/mui/material-ui/pull/40792 (or at least part of it). Apologies, I think I forgot about the existence of this PR while building that.

Janpot avatar Mar 08 '24 13:03 Janpot

I need to go back to it and see if some of it still make sense :laughing:

flaviendelangle avatar Mar 08 '24 13:03 flaviendelangle