Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

Export kit-module-emulator #6

Closed
benbender opened this issue Apr 10, 2022 · 3 comments
Closed

Export kit-module-emulator #6

benbender opened this issue Apr 10, 2022 · 3 comments

Comments

@benbender
Copy link

benbender commented Apr 10, 2022

I would like to ask if it would be possible to export the kitModuleEmulator-plugin?

I was thinking of using it in https://github.com/storybookjs/builder-vite instead of mocking the sveltekit-modules by myself.

Thank you!

@nickbreaton
Copy link
Owner

Sure I can take a look at doing this, I would also encourage you to track sveltejs/kit#4329 which would essentially deprecate this project and would provide official functionality for what you're asking for.

I'll likely just expose this in the package itself so something like import x from 'vitest-svelte-kit/emulator' since I don't want to encourage others to do depend on this. Official support would be more beneficial to the community at large imo.

@benbender
Copy link
Author

Hey thanks for the hint! I'll have a look!

A sub-export is perfectly fine to me and I would agree, that an official solution would be the better way to go. Atm, most recommended solutions out there are just plain broken remappings of the internal sveltekit-modules and are bound to brake at some point. In this context, your solution is an improvement until something official arrives :)

@benmccann
Copy link
Contributor

@sveltejs/kit/experimental/vite has been released in @sveltejs/kit version 1.0.0-next.353. Feedback welcome in sveltejs/kit#5184

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

No branches or pull requests

3 participants