1
votes

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?

1
Would love to help you. But what is your question? where in config is the setting for serving up your app? - Alexander Taran
Added more info. I just want the webpack dev server to serve https instead of http when I run au run - clouddreams

1 Answers

2
votes

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.