Reputation: 123
I'd like to use an index.php file instead of index.html in my ember application.
I found out that I can set the following in my ember-cli-build.js file, which will output my index.html as index.php
outputPaths: {
app: {
html: 'index.php'
}
}
But with this, the input file still has to be named index.html.
Does anybody know how to configure the app in order to have the source file named index.php, too.
Upvotes: 3
Views: 360
Reputation: 325
I couldn't find a way to rename the source file but I had no problems adding php to the index.html file and having it copied over to index.php on build.
I did run into a problem though where after making this change the md5 fingerprints were no longer updated.
I found the solution here https://github.com/ember-cli/ember-cli/issues/5658 Adapted from the last post:
// in ember-cli-build.js
var app = new EmberApp(defaults, {
// Add options here
fingerprint : {
replaceExtensions : [ 'html', "php", 'css', 'js' ]
},
outputPaths : {
app : {
html : 'index.php',
}
}
});
Upvotes: 3