-
Notifications
You must be signed in to change notification settings - Fork 31
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
Production Build Fails to Import Module - ESM/CJS conflict #120
Comments
Ok sorry for the noise, and thanks for rubberducking, it was actually ts-belt the culprit. I've I'll close the issue. For reference the patch file :
|
👍 No worries. (FYI in case your company is up for it we're looking for sponsors (vikejs/vike#1350).) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report
Steps to Reproduce:
Repo/branch to clone https://github.com/age2pierre/solid-capacitor/tree/bug/vite-func
Install dependencies:
Start the server in development mode:
Visit http://localhost:3000/ and click the "Generate" button. The request succeeds with a 200 status.
Now build and start the server in production mode:
Visit http://localhost:3000/ again and click the "Generate" button. This time the request fails with a 500 error.
Error:
The production server throws the following error:
Additional Notes:
The issue might stem from the
ts-belt
package.json (https://publint.dev/@mobily/[email protected]), but since this works fine in dev mode (usingtsx
which in turns uses esbuild), and with Vite also using esbuild, there might be a configuration adjustment possible in Vite/Telefunc to resolve this issue.Also from what I can see
/dist/server/entry.js
is correctly loaded beforehand.Could you assist in configuring Vite/Telefunc to handle this module issue and/or confirm/infirm it's a bug in telefunc ?
If it is out of scope for this project, I understand and don't want to abuse your time.
The text was updated successfully, but these errors were encountered: