Open drdaemos opened 1 year ago
Is there any additional information I can provide to help debug this?
@drdaemos,
We're actively working on the issue you've reported, but as of now, we haven't been able to replicate it ourselves. It would be immensely helpful if you could share a sample project that demonstrates the problem you're encountering.
If providing an example project isn't feasible, could you please share some additional information with us? Specifically, we'd appreciate it if you could provide details about your Node.js version, your tsconfig.ts file, and any configuration you added.
I will try to gather an example project and get back to you.
In general, judging by the compiled files - there definitely is a dependency between @frontegg/redux-store/auth/LoginState/saga.js
and @frontegg/redux-store/auth/SignUp/saga.js
: they both rely on at least one exported function from each other.
I'm not sure why it is not causing problems in the other envs, maybe Vite is doing some clever tree-shaking with the options that we have. If I don't build this with Vite and just use HMR to introduce the code dependent on the frontegg-react
, it actually works fine.
Here is the example project repo: https://github.com/drdaemos/frontegg-circular-issue
@drdaemos awesome! thanks. I realized that your Vite config file is different. When I use yours, I can reproduce it. We are working on a fix.
Hey @drdaemos, it seems that your build is failing due to an internal configuration you have added to fail the build with every rollup warning:
rollupOptions: {
onwarn(warning) {
throw Object.assign(new Error(), warning)
},
},
We will release a fixed version probably by the end of the week or early next week.
Any update on this?
By the way, we're now seeing
Circular dependency: ../../../node_modules/@frontegg/redux-store/auth/index.js -> ../../../node_modules/@frontegg/redux-store/auth/saga.js -> ../../../node_modules/@frontegg/redux-store/auth/SSOState/saga.js -> ../../../node_modules/@frontegg/redux-store/auth/LoginState/saga.js -> ../../../node_modules/@frontegg/redux-store/toolkit/index.js -> ../../../node_modules/@frontegg/redux-store/auth/index.js
Describe the bug Running
vite build
fails on a npm package that depends on@frontegg/frontegg-react
v5.0.50 with error:To Reproduce Have a JavaScript npm package similar to the following template:
Have the following code in your package source files:
Expected behavior I expect
vite build
to run without issues.Additional context
Here is the build error log: