未能加载模块脚本:服务器以非JavaScript、CSS MIME类型“响应”;文本/x-scss“;

未能加载模块脚本:服务器以非JavaScript、CSS MIME类型“响应”;文本/x-scss“;,javascript,Javascript,伙计们 我收到了教授的一点代码。在本地运行liveserver时,js在浏览器终端中给了我一个错误 Failed to load module script: The server responded with a non-JavaScript, CSS MIME type of "text/x-scss". Strict MIME type checking is enforced for module scripts per HTML spec. 我从未在javascr

伙计们

我收到了教授的一点代码。在本地运行liveserver时,js在浏览器终端中给了我一个错误

Failed to load module script: The server responded with a non-JavaScript, CSS MIME type of "text/x-scss". Strict MIME type checking is enforced for module scripts per HTML spec.
我从未在javascript中实现过css文件,也从未使用过SCS,所以我不知道如何处理这个问题。 我希望这里有人知道如何帮助我


问候语

您需要使用node sass或webpack等工具将scss文件编译为css,然后在项目中引用该文件

sass在发送到浏览器之前使用编译器编译为css。浏览器不知道如何处理scss文件