1

I need to use https://localhost:8080 for testing facebook login in development when I run au run so that the app uses https instead of http.

The current setup is using the standard aurelia+typescript+webpack skeleton created from au new.

I added https: true to devServer field in my webpack.config.js but it doesn't work. https://webpack.js.org/configuration/dev-server/#devserver-https. Do I need to do anything special for Aurelia?

clouddreams
  • 622
  • 1
  • 4
  • 13

1 Answers1

2

Seems like an oversight in the run.ts task. The https property is not being copied over.

If you make this modification it should work:

function runWebpack(done) {
  // https://webpack.github.io/docs/webpack-dev-server.html
  let opts = {
    host: 'localhost',
    publicPath: config.output.publicPath,
    filename: config.output.filename,
    hot: project.platform.hmr || CLIOptions.hasFlag('hmr'),
    port: project.platform.port,
    contentBase: config.output.path,
    historyApiFallback: true,
    open: project.platform.open,
    stats: {
      colors: require('supports-color')
    },
    https: config.devServer.https // add this line
  }

I submitted a PR that should fix this.

Fred Kleuver
  • 7,797
  • 2
  • 27
  • 38
  • Thanks for pointing me in the right direction, I accepted your answer. Would you please update it to use config.devServer.https? – clouddreams Apr 07 '18 at 09:14
  • 1
    Darn, I actually tested it and somehow managed to mess it up in the answer. Thanks for pointing this out! – Fred Kleuver Apr 07 '18 at 09:22