devServer:{
contentBase:'./build/',
host:'192.168.0.102',
port:'8020',
color:true
}
比如说,我用webpack-dev-server 编译出来的路径http://192.168.0.102:8020/web... 然后我想要指定它第一次打开的页面,这个时候我要怎么去配置呢
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
一般是这么做的,在build目录下建一个index.html,在里面用javascript或者meta来跳转到你想要的页面。
不用觉得这个方法low,你到时候部署到生产环境的时候也是只能这么干的