Table Of Contents

骑驴找蚂蚁

全干工程师

webpack-dev-server开启https

#package.json
{
    ...
    "scripts":{
        "start:dev": "webpack-dev-server --env development --https --watch-poll"
    }
    ...
}

#webpack.config.js

config = {
        ...
        devServer: {
            contentBase: './src',
            inline: true,
            hot: true,
            host: '127.0.0.1',
            port: 443
        },
        ...
}

留言