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

Populate event.platform data during dev with Vite plugins #9464

Closed
kgallimore opened this issue Mar 21, 2023 · 1 comment
Closed

Populate event.platform data during dev with Vite plugins #9464

kgallimore opened this issue Mar 21, 2023 · 1 comment

Comments

@kgallimore
Copy link

Describe the problem

Using a custom node server with middleware, as of right now only running the prod build actually allows the populated data to be exposed under event.platform inside of hoosk.server.ts. This may be a vite issue but I asked both in the vite and svelte discord servers and no one gave a response. I am also assuming that this is not a bug but just not an implemented feature, and I have also tried adjusting the order the plugin is executed.

Describe the proposed solution

Passing a middleware as a vite plugin under dev should populate the same event.platform object as it does when running a custom node server with that middleware.

Alternatives considered

No response

Importance

nice to have

Additional Information

Here is a repo to demonstrate how dev does not populate event.platform, but prod does. I have an example of both express and connect under expressServer.js and connectServer.js
https://github.com/kgallimore/Sveltekit-SSPI
Running dev will log how the req.sso object is being populated in the plugin, but is not found in event.platform. Running either server will show that it is available.
Thanks!

@Conduitry
Copy link
Member

This would fall under #2304. We want to find a way to make this work across all adapters, not just the Node one.

@Conduitry Conduitry closed this as not planned Won't fix, can't repro, duplicate, stale Mar 21, 2023
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