【发布时间】:2015-02-13 10:01:47
【问题描述】:
SystemJS 可以指定从导入的文件中呈现什么样的内容:
- CSS
System.import('my/file.css!') - 图片
System.import('some/image.png!image') - JSON
System.import('some/data.json!').then(function(json){}) - 文字
System.import('some/text.txt!text').then(function(text) {})
(Source)
使用 SystemJS,从附加类型的文件导入,在 Webstorm 中会出错。
所以当我这样做时:
import template from './404.template.html!text';
意思是我需要纯文本的 html 文件,Webstorm 显示错误提示:
无法解析文件'404.template.html!text'
在我的所有项目文件结构树中显示红色下划线。
我怎样才能让 Webstorm 只解决!之前的部分?
【问题讨论】:
标签: javascript webstorm ecmascript-6 systemjs