我正在使用 Grunt 连接 Web 服务器在本地提供 JS 和 CSS 文件。
Grunt-contrib-connect:https ://github.com/gruntjs/grunt-contrib-connect
Grunt 任务如下所示:
connect: {
server: {
options: {
port: 9001,
base: '<%= templateDir %>/interface/build/',
livereload: true,
debug: true
}
}
}
它正确地提供 JS 文件,但提供的所有 CSS 文件都是空的。
以下是用于访问文件的本地 URL:
JS 网址:http://localhost:9001/production.js
CSS URL:http://localhost:9001/production.css
非常感谢任何帮助或想法!