文件结构是图片所示, browserSync设置的根目录是在html,那里面的html文件访问dist文件夹里的css就是*../dist/index.css*,实际并不能访问到。。。官方文档没有仔细说config该如何设置??求解

browserSync.init({
server:{
baseDir:'./app/html'
}
})
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
你把目录设为./app/html,就只能访问这个文件夹里面的资源,可以把目录设为./app,然后通过localhost:3000/html/index.html访问,这样就有css了