fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

[Bug]: `build` task broken on local env after introducing swc and babel module aliases setup

Open Hotell opened this issue 2 years ago • 2 comments

Library

React Components / v9 (@fluentui/react-components)

System Info

na

Are you reporting Accessibility issue?

None

Reproduction

  1. rm -rf packages/**/{lib,lib-commonjs,dist}
  2. yarn workspace @fluentui/react-text build
image

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.

Hotell avatar Apr 11 '23 14:04 Hotell

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.

Hotell avatar Apr 11 '23 15:04 Hotell

probably fixed - todo check @Hotell

Hotell avatar May 30 '23 15:05 Hotell

fixed by https://github.com/microsoft/fluentui/pull/27313

Hotell avatar Jun 27 '23 15:06 Hotell