Webstorm Meteor CSS 背景图像位置

Webstorm Meteor CSS Background Image Locations

到目前为止,我对 Meteor 越来越熟悉并且很喜欢它。我 IDE 选择的是 Webstorm (PHPStorm),我 运行 很烦恼,我想知道是否有人有解决方案。

基本上,Meteor 在提供来自 /public 目录的文件时实现了魔法,因为您可以在提供时将其关闭,比如在本例中为图像。所以让我们想象一下我有这个结构:

- public
  - images
    - test.png

我的 CSS 文件中有这条规则:

.some-class{
  background: url('/images/test.png') no-repeat center center;
}

当然,Meteor 可以很好地显示图像,但 Webstorm 将其视为丢失的文件,从而在 CSS 文件中引发错误。 (Webstorm 预计 /public/images/test.png)。

有什么方法可以解决这个问题,这样我就可以避免每次输入图像时出现波浪形吗?当它让我知道我隐藏了图像时,这是一个很有用的功能路径,但它出现在这个配置中我注定总是让我的 CSS 文件中的路径出现中断。

很好奇是否有人找到了解决此问题的方法,而不必走关闭检查的繁重路线。

谢谢大家!

这是软件问题,但您的解决方案是:

Settings -> editor -> inspections then on right panel select css -> invalid element -> uncheck unknown file or directory 

评论后编辑:

Webstorm: “Cannot Resolve Directory”