在IDE中打开文件* .css,然后选择行尾到LF(在我的情况下,我已将CRLF更改为LF)。
,
此问题可能有多种原因,我将给出3种可能的解决方案,请尝试所有解决方案
- 尝试更新
index.js
中存在的node_modules\resolve-url-loader
,因此这里
在var options
下
var options = Object.assign({
sourceMap: loader.sourceMap,engine: 'postcss',silent: false,absolute: false,keepQuery: false,**
removeCR: false-- > make this "true" **,root: false,debug: false,join: joinFn.defaultJoin
}
然后重新启动您的应用
-
下一个解决方案与上述相同,将行序列结尾更改为LF
See screenshot below to know how it is done in VS Code
-
通过逐一注释CSS文件并运行代码以查找包含错误的文件来检查CSS文件。检查所有导入语句以及CSS文件中的Web链接。
P.S。这是我的第一个答案,所以请对我轻松一点:p
有关我写的内容的更多参考,您也可以访问此链接-> For more details you can also refer this link
,
- 转到 node_modules/resolve-url-loader/index.js
- 找到 removeCR 选项(就我而言,它位于第 53 行)
- 将其从“假”改为“真”
- 重新启动您的应用
,
尝试将node_modules / resolve-url-loader / index.js中的 | otherwise = Left "fail"
更改为def unique_in_order(iterable):
output = []
letter = None
for current in iterable:
if current != letter:
output.append(current)
letter = current
return output
,希望有帮助。
,
在您的IDE中将“ CRLF”切换为“ LF”(反之亦然)(在我的情况下为Visual Studio代码)
,
对于仍然有此问题的任何人,我找到了永久解决方案。
您可以使用 .gitattributes 来防止文件被转换为 CRLF。
.gitattributes 文件看起来像这样
*.vcproj eol=crlf
*.sh eol=lf
添加
*.scss eol=lf
此设置强制 Git 在签入时将行尾规范化为 LF,并防止在签出文件时转换为 CRLF。
只需提交 .gitattributes 文件,您的文件就会在每个以 LF 行结尾的系统上检出。
本文链接:https://www.f2er.com/2820338.html