Question

There are two files in my project:

  • index.js where the following code is

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

  • general.handlebars which is correctly taken by require.js and the 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.

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'. 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?

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top