diff options
| -rw-r--r-- | src/utils/hono-stub.ts | 2 | ||||
| -rw-r--r-- | vite.config.ts | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/utils/hono-stub.ts b/src/utils/hono-stub.ts new file mode 100644 index 0000000..856a76a --- /dev/null +++ b/src/utils/hono-stub.ts @@ -0,0 +1,2 @@ +// Stub for server-side dependencies that are not used in the browser +export default {}; diff --git a/vite.config.ts b/vite.config.ts index e71fdf3..1616d2b 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -6,6 +6,8 @@ export default defineConfig({ resolve: { alias: { '@': path.resolve(__dirname, 'src'), + '@hono/node-server': path.resolve(__dirname, 'src/utils/hono-stub.ts'), + 'hono': path.resolve(__dirname, 'src/utils/hono-stub.ts'), }, }, plugins: [react()], @@ -13,9 +15,4 @@ export default defineConfig({ 'process.env': {}, 'global': 'globalThis', }, - build: { - rollupOptions: { - external: ['hono', '@hono/node-server'], - }, - }, }); |
