stefanpenner/ember-app-kit

Deploying to a non-root directory

Closed this issue · 3 comments

I build a client-side app using Ember App Kit and built it for production. The build process bases all of the assets from the base URL (e.g. /assets/… versus assets/…).

I'm not hosting this app at the base URL, so the app is getting 404s when trying to load the assets.

Does anyone have any advice as to where I can go to adjust this behavior?

cjk commented

I'm having the same problem. My assets in production reside under /prefix/assets/*.

My first thought was to add a root: 'prefix'- option to tasks/options/useminPrepare.js but this doesn't seem to work (nothing changes).

Removing the initial slash from the asset-paths in index.html to make them relative might work but probably causes other side-effects.

Anybody know the official way to deal with custom url-prefixes in production environments?

@cjk I went ahead and did it. So far, I haven't had any problems.

@cjk relative pathes work for me.