rwjblue / ember-cli-pretender

MIT License
65 stars 40 forks source link

Fastboot Compatibility #49

Open techsoldaten opened 8 years ago

techsoldaten commented 8 years ago

ember-cli-pretender throws an error when used with fastboot.

2016-06-30T03:13:47.773Z 500 Unknown Error: ReferenceError: document is not defined at parseURL (/ember/public/dist/fastboot/vendor.js:68010:16)

The offending code:

function parseURL(url) { // TODO: something for when document isn't present... #yolo var anchor = document.createElement('a'); anchor.href = url; anchor.fullpath = anchor.pathname + (anchor.search || '') + (anchor.hash || ''); return anchor; }

musaffa commented 6 years ago

In Fastboot environment, I get this error Could not find modulepretenderimported from 'initializers/start-server'. In start-server.js, I tried to import pretender by import Pretender from 'pretender';