vite-plugins icon indicating copy to clipboard operation
vite-plugins copied to clipboard

WIP: initial commit for wrangler support

Open Code-Hex opened this issue 2 years ago • 3 comments

Relate: https://github.com/honojs/vite-plugins/issues/25

Now, we can use wrangler.toml and use local storage under .wrangler/state/v3

import { defineConfig } from 'vite';
import devServer from '@hono/vite-dev-server'

export default defineConfig(({ mode }) => {
  return {
    plugins: [
      devServer({
        entry: 'src/worker.ts',
        wranglerTomlPath: 'wrangler.toml',
      }),
    ],
    esbuild: {
      target: 'es2021',
    },
  };
});

Code-Hex avatar Nov 13 '23 07:11 Code-Hex

Hi @Code-Hex,

I'm currently refactoring the dev-server code. This won't involve any breaking changes, but there will be significant changes to the code base. I'll create a PR soon, but you should hold off on any further developments until then.

yusukebe avatar Nov 13 '23 22:11 yusukebe

@yusukebe OK! Thanks.

Code-Hex avatar Nov 14 '23 16:11 Code-Hex

Hi @Code-Hex,

I've refactored and added the ENV / env feature in PR #30, and have bumped to a new version.

So, now you can go ahead with your PR!

yusukebe avatar Nov 16 '23 14:11 yusukebe