fluentui
fluentui copied to clipboard
[Bug]: `build` task broken on local env after introducing swc and babel module aliases setup
Library
React Components / v9 (@fluentui/react-components)
System Info
na
Are you reporting Accessibility issue?
None
Reproduction
rm -rf packages/**/{lib,lib-commonjs,dist}yarn workspace @fluentui/react-text build
Bug Description
Actual Behavior
With introduction of babel-plugin-module-resolver within @griffel preset we map to esm js files.
This approach forces us to have package dependencies esm transpiled JS ready in order to be able to run build, thus simple yarn workspace @fluentui/react-text build will throw an error.
With this setup one needs to run commands via lage: lage build --to @fluentiu/react-text
Expected Behavior
Expected behaviour should be no need to run lage for whole dependency tree. Although based on our CI/tooling performance research we should not go this route for performance reasons. Whilst on local machine it was without issues actually providing better DX, as we will go forward with implementing patterns for faster CI/DX we should align CI/Local env - thus enforcing using only lage to run commands / in future nx
Logs
No response
Requested priority
Normal
Products/sites affected
No response
Are you willing to submit a PR to fix?
yes
Validations
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] The provided reproduction is a minimal reproducible example of the bug.
Discussed offline with @layershifter , we could use typescript babel preset within griffel and mat to ts sources to mitigate this, but as I mentioned within the "expected behaviour" section, long term this is not the DX we want (different behaviour on local and CI etc). Also it would additional processing time to the build, although babel typescript stripping is quite fast AFAIK.
probably fixed - todo check @Hotell
fixed by https://github.com/microsoft/fluentui/pull/27313