@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 07:15 UTC

main
ts 22 lines 640 Bytes
Raw
1 import assert from "node:assert";
2 import { defineConfig } from "vite";
3
4 // The playground's plugin: resolving a Node.js built-in through the Worker
5 // environment's plugin container yields its external id.
6 export default defineConfig({
7 plugins: [
8 {
9 name: "test-plugin",
10 async configureServer(viteDevServer) {
11 const workerEnvironment = viteDevServer.environments.ssr;
12 assert(workerEnvironment);
13
14 const resolved = await workerEnvironment.pluginContainer.resolveId("node:dns");
15
16 if (resolved) {
17 workerEnvironment.logger.info(`__${resolved.id}__`);
18 }
19 },
20 },
21 ],
22 });