dimanche 19 février 2017

Generating Production Build index.html With Server Side App

I want to do something very simple that I am a little surprised people are not talking about more. I would like to generate on my server my own index.html from the files that are created from building ember for production. I use ember for part of my application and so when a certain URL is hit, I would then like my ember app to take over. I have tried generating my own index.html by changing the flag storeConfigInMeta in ember-cli-build.js.

storeConfigInMeta: false

This gets rid of the ember app having its configuration stored in a meta tag but the app still does not work and gives the error,

Uncaught ReferenceError: define is not defined

I have the latest version of ember and I am building ember with the command,

ember build --env production

My server generated index.html looks identical accept for the integrity attributes set on the include js and css scripts. Is their anything I am missing about approaching ember this way? Should I not be trying to do this?




Aucun commentaire:

Enregistrer un commentaire