流星火焰如何覆盖启动点?

时间:2017-08-22 19:26:43

标签: meteor meteor-blaze

我想创建我们的插件/模板。

我目前的文件结构:

/client/
-main.js 
/imports/startup/
-html.js
-index.js

默认文件/client/main.html包含头标记。我想将头标记替换为/ imports / startup /目录。

// /client/main.js
import '../imports/startup';

// /imports/startup/index.js
import { Template } from 'meteor/templating';

import './index.html';

// /imports/startup/index.html
<head>
  <title>index_html</title>
</head>

我收到错误:

  

未捕获错误:找不到模块'./index.html'

错误屏幕:

enter image description here

这是我的错误?

第2天:

我添加到index.html body标签

// project_name/imports/startup/index.html
<head>
  <title>index_html</title>
</head>
<body>
  <p>body_html</p>
</body>

现在我没有收到错误:找不到模块'./index.html',我在页面上看到“body_html”注释。但是我没有在头标记中看到我的标题。

是否可以将 head 标记从客户端 foldet替换为导入文件夹?

1 个答案:

答案 0 :(得分:1)

您在目录的根目录中根本没有名为index.html的文件。

也许你的意思是index.js

相关问题