简体   繁体   English

停止在hbs上显示错误的Webstorm! require.js的插件

[英]Stop Webstorm of Displaying Error on hbs! Plugin for require.js

There are two files in my project: 我的项目中有两个文件:

  • index.js where the following code is index.js以下代码所在的位置

    define([ 'exports', 'hbs!./general'], function (exports, generalTemplate) { }); define(['exports','hbs!./ general'],function(exports,generalTemplate){});

  • general.handlebars which is correctly taken by require.js and the hbs! general.handlebars由require.js和hbs!正确使用hbs! plug-in. 插入。

I'm basically using Require.js with Handlebars.js and the https://github.com/SlexAxton/require-handlebars-plugin for automating the creation of templates from files. 我基本上使用Require.js和Handlebars.js以及https://github.com/SlexAxton/require-handlebars-plugin来自动从文件创建模板。

It works correctly, but Webstorm 8 (and also 7 before it) doesn't understand the file is correct so it always complains with: Cannot resolve file 'general' . 它工作正常,但Webstorm 8(以及它之前的7)不理解文件是正确的所以它总是抱怨: 无法解析文件'一般' It is the same with every file using that plugin prefix. 使用该插件前缀的每个文件都是一样的。

I coudln't find where (if it exists) to turn that notification off, because it underlines the entire file, and its parent directories as having errors. 我没有找到关闭该通知的地方(如果存在),因为它强调整个文件,并且其父目录有错误。

How can I remove this error of being reported? 如何删除此报告错误?

This notification can't be turned off unfortunately - annotator-level inspections can't be suppressed. 遗憾的是,无法关闭此通知 - 无法抑制注释器级别的检查。 The issue with relative paths resolving when loading plugins for non-js extensions is tracked as WEB-1167 , please vote 加载非js扩展插件时相对路径解析的问题跟踪为WEB-1167 ,请投票

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM