Skip to content
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

Using with UI library cause errors #12409

Closed
toanil315 opened this issue Nov 27, 2024 · 2 comments
Closed

Using with UI library cause errors #12409

toanil315 opened this issue Nov 27, 2024 · 2 comments
Labels

Comments

@toanil315
Copy link

I'm using React Router as a...

framework

Reproduction

https://github.com/toanil315/survey-creator/tree/feat/try-react-router-v7

System Info

System:
    OS: macOS 14.6.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 1.28 GB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.15.0 - ~/.nvm/versions/node/v20.15.0/bin/node
    Yarn: 1.22.22 - ~/.nvm/versions/node/v20.15.0/bin/yarn
    npm: 10.7.0 - ~/.nvm/versions/node/v20.15.0/bin/npm
    pnpm: 9.12.2 - ~/.nvm/versions/node/v20.15.0/bin/pnpm
  Browsers:
    Chrome: 131.0.6778.86
    Edge: 131.0.2903.70
    Safari: 17.6
  npmPackages:
    @react-router/dev: * => 7.0.1 
    @react-router/fs-routes: ^7.0.1 => 7.0.1 
    @react-router/node: * => 7.0.1 
    react-router: * => 7.0.1 
    vite: ^5.4.11 => 5.4.11

Used Package Manager

yarn

Expected Behavior

I can start my pet project using the @fluentui/react-components UI library. This project worked with Vite v4 before, but after migrating to React Router v7, it is broken

Actual Behavior

image
@toanil315 toanil315 added the bug label Nov 27, 2024
@3fuyang
Copy link

3fuyang commented Nov 28, 2024

Try including them in the ssr.noExternal option?

@toanil315
Copy link
Author

@3fuyang thanks, I have added all Fluentui packages into ssr.noExternal and it worked

 ssr: {
    noExternal: [
      /@fluentui|@swc|@floating-ui/ ,
      '@griffel/react',
    ],
  },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants