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

Add webpackServer config. #758

Closed
LinFeng1997 opened this issue Aug 23, 2018 · 2 comments
Closed

Add webpackServer config. #758

LinFeng1997 opened this issue Aug 23, 2018 · 2 comments
Labels
version: next Planned to do or already included in the next(1.0.0) version

Comments

@LinFeng1997
Copy link
Contributor

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!

@ulivz
Copy link
Member

ulivz commented Aug 23, 2018

Thanks, but it has been included in the next version.

@ulivz ulivz added the version: next Planned to do or already included in the next(1.0.0) version label Aug 23, 2018
@LinFeng1997
Copy link
Contributor Author

@ulivz Thanks,I am very much looking forward to the release of the next version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
version: next Planned to do or already included in the next(1.0.0) version
Projects
None yet
Development

No branches or pull requests

2 participants