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

Calcite React does not work with Vite #7598

Closed
2 of 3 tasks
mpayson opened this issue Aug 24, 2023 · 1 comment
Closed
2 of 3 tasks

Calcite React does not work with Vite #7598

mpayson opened this issue Aug 24, 2023 · 1 comment
Labels
0 - new New issues that need assignment. ArcGIS Online Issues logged by ArcGIS Online team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components-react Issues specific to the @esri/calcite-components-react package. impact - p0 - emergency User set priority impact status of p0 - emergency needs triage Planning workflow - pending design/dev review.

Comments

@mpayson
Copy link

mpayson commented Aug 24, 2023

Check existing issues

Actual Behavior

The new auto-import mechanism for calcite-react-components does not work with Vite, either with the dev server or in a production build. The components do not load, and there are import errors in the console

Note, apps can load if they import the calcite components independently, but the console errors will still be logged

Related issue for vitest that was resolved #7486

Expected Behavior

Calcite react can be used with Vite

Reproduction Sample

https://stackblitz.com/edit/vitejs-vite-1r2cnf

Reproduction Steps

  1. Open console and run app
  2. See errors in console log
  3. See button doesn't load

Also, I'm surprised that there are errors coming from trying to import many different calcite components, since only the button is used in the sample -- maybe the button is dependent on these components, or the import mechanism is trying to import all calcite components?

Screenshot 2023-08-24 at 11 32 31 AM

Reproduction Version

1.6.1

Relevant Info

No response

Regression?

1.4.3

Priority impact

p0 - emergency

Impact

I marked this as an emergency because it makes the components unusable with a common build tool, and the auto-import mechanism seems unstable, but apps may become dependent on it since it is released (let me know if this is not a correct assessment)

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-react

Esri team

ArcGIS Online

@mpayson mpayson added 0 - new New issues that need assignment. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. needs triage Planning workflow - pending design/dev review. labels Aug 24, 2023
@github-actions github-actions bot added ArcGIS Online Issues logged by ArcGIS Online team members. impact - p0 - emergency User set priority impact status of p0 - emergency calcite-components-react Issues specific to the @esri/calcite-components-react package. labels Aug 24, 2023
@benelan
Copy link
Member

benelan commented Aug 24, 2023

Hi @mpayson! We are already looking into this via #7575. Closing this one as a duplicate.

@benelan benelan closed this as completed Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - new New issues that need assignment. ArcGIS Online Issues logged by ArcGIS Online team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components-react Issues specific to the @esri/calcite-components-react package. impact - p0 - emergency User set priority impact status of p0 - emergency needs triage Planning workflow - pending design/dev review.
Projects
None yet
Development

No branches or pull requests

2 participants