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

require('./definitions/init'); Removed by Tree Shaking Using Vite #173

Open
Rhodanthe1116 opened this issue Dec 23, 2024 · 0 comments · May be fixed by #174
Open

require('./definitions/init'); Removed by Tree Shaking Using Vite #173

Rhodanthe1116 opened this issue Dec 23, 2024 · 0 comments · May be fixed by #174

Comments

@Rhodanthe1116
Copy link

When using Vite 6.0.4 and ra-data-hasura 0.7.0, the application works correctly in local development (when running npm run dev or vite). However, when building for production (npm run build or vite build) with minification disabled for debugging purposes, the following error occurs:

gqlTypes.name is not a function

This issue arises in the file

gqlTypes.variable(gqlTypes.name(arg.name)),

Root Cause:

Upon investigation, it appears that the line below is being removed by tree shaking, which leads to the error:

require('./definitions/init');

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

Successfully merging a pull request may close this issue.

1 participant