我在标签和源映射中遇到CSS问题.
为了改善项目的加载时间,我改变了将CSS放入HTML的方式,转而:
<html>
<head>
<link rel="stylesheet" href="css/styles.css">
</head>
<body>
<h1>Source-maps working wonderfully</h1>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
进入:
<html>
<head>
<style>
h1 { color: red };
//more css
/*# sourceMappingURL=css/style.css.map */
</style>
</head>
<body>
<h1>Source-maps not working :(</h1>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
基本上,在构建过程中,使用sassc(带有sourcemaps标志)生成的原始CSS文件将被转储到将要提供的html中.
我遇到了麻烦,因为当CSS在标签内部时它不能识别源映射,但是当我使用标签时它完美地完成了它.我错过了额外的注释还是不支持?
我正在使用铬.