Skip to content

Add webpackServer config. #758

Closed
Closed
@LinFeng1997

Description

@LinFeng1997

Feature request

What problem does this feature solve?

custom dev server koa config.

What does the proposed API look like?

In .vuepress/config.js:

module.exports = {
  webpackServer: (app, middleware, options) => {
    app.use(xxx)
  }
}

How should this be implemented in your opinion?

In lib/dev.js,add code:

// ... other code
app.use(convert(history({
        rewrites: [
          { from: /\.html$/, to: '/' }
        ]
})))

if (options.siteConfig.webpackServer) {
    options.siteConfig.webpackServer(app, middleware, options)
}

Are you willing to work on this yourself?**

Yes!

Metadata

Metadata

Assignees

No one assigned

    Labels

    version: nextPlanned to do or already included in the next(1.0.0) version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions