Ember.js 余烬索引未生成index.jsp

Ember.js 余烬索引未生成index.jsp,ember.js,Ember.js,我正在尝试使用ember index插件来生成index.jsp文件,而不是index.html。我已经安装了ember index插件,并做了必要的更改 我的config/environment.js文件如下所示 /* eslint-env node */ 'use strict'; module.exports = function(environment) { let ENV = { modulePrefix: 'user-profile', output: 'in

我正在尝试使用ember index插件来生成index.jsp文件,而不是index.html。我已经安装了
ember index
插件,并做了必要的更改

我的
config/environment.js
文件如下所示

/* eslint-env node */

'use strict';

module.exports = function(environment) {
  let ENV = {
    modulePrefix: 'user-profile',
    output: 'index.jsp',
    environment,
    rootURL: '/',
    locationType: 'hash',
    EmberENV: {
      FEATURES: {
        // Here you can enable experimental features on an ember canary build
        // e.g. 'with-controller': true
      },
      EXTEND_PROTOTYPES: {
        // Prevent Ember Data from overriding Date.parse.
        Date: false
      }
    },
    'ember-index': {
        output: 'index.jsp',
        content: {
            file: 'example.txt',
            includeInOutput: true,
            includeInIndexHtml: false
        }
    },

    APP: {
      // Here you can pass flags/options to your application instance
      // when it is created
    }
  };
return ENV;
};
另外,我的
example.txt
文件如下所示

<meta content="Example">
<h2>html to jsp</h2>

但是现在,当我试图用ember build构建ember项目时,我无法在我的dist文件夹中看到
index.jsp
文件。

使用一个新的应用程序,这个插件可以正常工作。使用一个新的Ember应用程序来完成这个小例子的步骤,你会发现你错过了什么

您确定要在正确的位置查找index.jsp吗?在运行
ember build
之后,它位于dist/export/index.jsp

您忘记在index.html中添加标记了吗?自述文件指定要使用的文件,必须按如下方式指定:

<!-- app/index.html -->
<!DOCTYPE html>
<html>
  <head>
     ...
     {{content-for 'ember-index-1'}}
     {{content-for 'ember-index-2'}}
  </head>
  <body>
      ...
  </body>
</html>

...
{{ember-index-1'的内容}
{{ember-index-2'的内容}
...

有了一个新的应用程序,这个插件可以正常工作。使用一个新的Ember应用程序来完成这个小例子的步骤,你会发现你错过了什么

您确定要在正确的位置查找index.jsp吗?在运行
ember build
之后,它位于dist/export/index.jsp

您忘记在index.html中添加标记了吗?自述文件指定要使用的文件,必须按如下方式指定:

<!-- app/index.html -->
<!DOCTYPE html>
<html>
  <head>
     ...
     {{content-for 'ember-index-1'}}
     {{content-for 'ember-index-2'}}
  </head>
  <body>
      ...
  </body>
</html>

...
{{ember-index-1'的内容}
{{ember-index-2'的内容}
...

据我所知,当我们提供输出文件夹作为导出时,将创建导出文件夹,但我没有指定类似的内容,是的,我在正确的位置提供了标记的内容,但仍然无法获取index.jsp文件。我给您的建议是创建一个新的应用程序并比较配置。如果您仍然有问题,可能会打开插件的问题。我自己没用过这个。祝你好运据我所知,当我们提供输出文件夹作为导出时,将创建导出文件夹,但我没有指定类似的内容,是的,我在正确的位置提供了标记的内容,但仍然无法获取index.jsp文件。我给您的建议是创建一个新的应用程序并比较配置。如果您仍然有问题,可能会打开插件的问题。我自己没用过这个。祝你好运