在我的webpack.config.js文件中,我添加了https配置:
devServer: {
historyApiFallback: true,
contentBase: './',
https: true
}
当我导航到 https://localhost:8080/ 时,我收到了一个错误提示。
Your connection is not private
Attackers might be trying to steal your information from localhost (for example, passwords, messages, or credit cards). NET::ERR_CERT_AUTHORITY_INVALID
Subject: webpack
Issuer: webpack
Expires on: Dec 10, 2015
Current date: Mar 27, 2016
PEM encoded chain: -----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE----
看起来webpack的证书已经过期了。是我配置错了什么吗?还是我对SSL有误解?
我正在使用:
"webpack": "^1.12.9",
"webpack-dev-server": "^1.14.1"
webpack/webpack-dev-server
)以查看是否适用于您。 - Juho Vepsäläinen