2

In vuepress, I want to do some config for webpack devServer like below:

module.exports = { //... devServer: { https: true } };

but I don't know where I can config it. Does anyone know it?

In ..vuepress\config.js, config as below, but it doesn;t work.

module.exports = { chainWebpack (config, isServer) { } }

Thanks a lot.

1 Answer 1

1

You can do this configuration with .vuepress/config.js. There is two configuration for change webpack:

module.exports = {
  configureWebpack: (config, isServer) => {
  },

  chainWebpack: (config, isServer) => {
  }
}

For more details you can read the documentation: https://vuepress.vuejs.org/config/#configurewebpack

Sign up to request clarification or add additional context in comments.

2 Comments

Did this answer solve your problem? Please accept this answer and this will help others people. How to accept an answer?
This doesn't work for devServer though. Seems it only can be used to config build pipeline webpack configurations.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.