carlosV2 / adapter-node-ws

Adapter for SvelteKit apps that generates a standalone Node server with support for WebSockets.
MIT License
20 stars 4 forks source link

Missing .d.ts for import in vite.config.ts #2

Closed nicolas-albert closed 1 year ago

nicolas-albert commented 1 year ago

Hi, thanks for your plugin. I'm on a svelte project configured to use TS and I have a vite.config.ts like that:

import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';

export default defineConfig({
    plugins: [sveltekit()]
});

In cannot do that: import WebSockets from "@carlosv2/adapter-node-ws/plugin" nor import * as WebSockets from '@carlosv2/adapter-node-ws/plugin'

Do you have any clue?

Thx!

carlosV2 commented 1 year ago

Oh! Apologies, that was actually my fault. I forgot to export plugin.d.ts. Pulling the version 0.1.4 should fix it for you.

Thanks for letting me know!

nicolas-albert commented 1 year ago

Ok, now I have an issue to import WebSocketServer in hooks.server.ts but this isn't caused by your plugin. I still cannot test and I've switched to a solution without WS for now.

carlosV2 commented 1 year ago

I see. Ok, I'll close this issue for now then. Let me know if you have other issues I can help you with :-)