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

devServer https options not performing #4912

Closed
anilcan-kara opened this issue Dec 1, 2019 · 1 comment
Closed

devServer https options not performing #4912

anilcan-kara opened this issue Dec 1, 2019 · 1 comment

Comments

@anilcan-kara
Copy link

anilcan-kara commented Dec 1, 2019

Version

4.1.1

What is actually happening?

node_modules\webpack-dev-server\lib\Server.js
Line 555:

  setupHttps() {
    console.log('options:', this.options);
    // if the user enables http2, we can safely enable https
    if (this.options.http2 && !this.options.https) {
      this.options.https = true;
    }
$ vue-cli-service serve --mode development --https --dashboard
 INFO  Starting development server...

[webpack.Progress] 0% compiling

options: {
  logLevel: 'silent',
  clientLogLevel: 'silent',
  historyApiFallback: { disableDotRule: true, rewrites: [ [Object] ] },
  contentBase: 'C:\\path\\to',
  watchContentBase: true,
  hot: true,
  compress: false,
  publicPath: '/',
  overlay: { warnings: false, errors: true },
  https: true,             <<<------ True from VUE UI serve settings
  proxy: undefined,
  before: [Function: before],
  open: false,
  transportMode: { server: 'sockjs', client: 'sockjs' },
  watchOptions: {}
}
@anilcan-kara
Copy link
Author

const fs = require('fs');

module.exports = {
  runtimeCompiler: true,
  configureWebpack: {
    devServer: {
      https: {
        key: fs.readFileSync('./.ssl/localhost/key.pem'),
        cert: fs.readFileSync('./.ssl/localhost/cert.pem'),
      },
    },
  },
};

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

No branches or pull requests

1 participant