Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow the server option to be Function #5275

Merged
merged 10 commits into from
Sep 3, 2024

Conversation

alexander-akait
Copy link
Member

@alexander-akait alexander-akait commented Aug 20, 2024

  • This is a bugfix
  • This is a feature
  • This is a code refactor
  • This is a test update
  • This is a docs update
  • This is a metadata update

For Bugs and Features; did you add new tests?

will be later

Motivation / Use-Case

#5258
#4741

Breaking Changes

No

Additional Info

No

/cc @ckken

Configuration:

module.exports = {
    name: "app",
    devtool: false,
    target: "web",
    entry: "./src/index.js",
    mode: "development",
    devServer: {
      setupMiddlewares: (_, devServer) => [
        {
          name: "webpack-dev-middleware",
          middleware: require("webpack-dev-middleware").honoWrapper(devServer.compiler),
        },
        {
          name: "static",
          middleware: require('@hono/node-server/serve-static')({ root: './public' }),
        },
      ],
      app: () => new (require("hono").Hono)(),
      server: (_, app) => require("@hono/node-server").serve(app),
    },
  }

There are still some things need to solve, but locally works fine

@alexander-akait alexander-akait changed the title Fix dev server false feat: allow the server option to be Function Aug 21, 2024
@ckken ckken mentioned this pull request Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant