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

BUG: Vite struggles with package due to configuration (with repro) #1757

Closed
lukebowerman opened this issue Jun 21, 2024 · 5 comments
Closed
Assignees

Comments

@lukebowerman
Copy link

Resubmitting this as I commented a while back on the closed ticket but haven't heard back.


Describe the bug

Managed to workaround this issue (manually marked package as ESM) but would love it the issues identified here: https://publint.dev/@rudderstack/[email protected] were addressed so this would "just work" with vite builds. :)

To Reproduce

Visit the report at: https://publint.dev/@rudderstack/[email protected]

Additional Information (please complete the following information):

  • SDK installation: NPM/CDN
  • CDN URL: (if applicable)
  • NPM Version: 3.0.0-beta.22
  • Share the event payload
  • Used JS Framework (e.g: Remix + vite)

I apologize for dropping the ball here. Got swamped with other things and never made it back to putting together a reproduction.

I went ahead and created a bare-bones Remix+Vite app with Rudderstack to show the issue. The repo is at https://github.com/lukebowerman/vite-remix-rudderstack-repro

To reproduce:

clone repo
npm install
npm run dev

You should see the following output when attempting to visit the application:

image

The workaround is to add the package to the Vite config with ssr.noExternal but more ideally the package.json in your upstream package would be fixed to include "type": "module"

You can see the publint's recommendations at: https://publint.dev/@rudderstack/[email protected]

Originally posted by @lukebowerman in #1623 (comment)

@saikumarrs
Copy link
Member

Hello @lukebowerman
Thanks for raising it. We'll get back to you.

@saikumarrs saikumarrs self-assigned this Jun 22, 2024
@saikumarrs
Copy link
Member

Hello @lukebowerman
Thanks for bringing them to our notice.
We've addressed the issues in the packages. The updated SDK will be released on the upcoming Monday.

@lukebowerman
Copy link
Author

Thank you!

@saikumarrs
Copy link
Member

Hello @lukebowerman,
All the reported issues have been addressed in v3.6.1.

Can you please check and confirm?

@lukebowerman
Copy link
Author

Just tested it out in a staging and production environments and it appears to be working perfectly now. Thank you!

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

No branches or pull requests

2 participants