我想在我的 ember 应用程序中使用 index.php 文件而不是 index.html。
我发现我可以在我的 ember-cli-build.js 文件中设置以下内容,这会将我的 index.html 输出为 index.php
outputPaths: {
app: {
html: 'index.php'
}
}
但是有了这个,输入文件仍然必须命名为 index.html。
有谁知道如何配置该应用程序,以便将源文件也命名为 index.php。
最佳答案
我找不到重命名源文件的方法,但在将 php 添加到 index.html 文件并在构建时将其复制到 index.php 时我没有遇到任何问题。
我确实遇到了一个问题,虽然在进行此更改后 md5 指纹不再更新。
我在这里找到了解决方案 https://github.com/ember-cli/ember-cli/issues/5658 改编自上一篇文章:
// in ember-cli-build.js
var app = new EmberApp(defaults, {
// Add options here
fingerprint : {
replaceExtensions : [ 'html', "php", 'css', 'js' ]
},
outputPaths : {
app : {
html : 'index.php',
}
}
});
关于php - Ember CLI : index. php 而不是 index.html,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33477813/