{"action":"created","issue":{"url":"https://api.github.com/repos/ember-engines/ember-engines/issues/280","repository_url":"https://api.github.com/repos/ember-engines/ember-engines","labels_url":"https://api.github.com/repos/ember-engines/ember-engines/issues/280/labels{/name}","comments_url":"https://api.github.com/repos/ember-engines/ember-engines/issues/280/comments","events_url":"https://api.github.com/repos/ember-engines/ember-engines/issues/280/events","html_url":"https://github.com/ember-engines/ember-engines/issues/280","id":195067301,"number":280,"title":"Engine include app.import hook fails for environment specific assets","user":{"login":"nmcclay","id":913988,"avatar_url":"https://avatars.githubusercontent.com/u/913988?v=3","gravatar_id":"","url":"https://api.github.com/users/nmcclay","html_url":"https://github.com/nmcclay","followers_url":"https://api.github.com/users/nmcclay/followers","following_url":"https://api.github.com/users/nmcclay/following{/other_user}","gists_url":"https://api.github.com/users/nmcclay/gists{/gist_id}","starred_url":"https://api.github.com/users/nmcclay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmcclay/subscriptions","organizations_url":"https://api.github.com/users/nmcclay/orgs","repos_url":"https://api.github.com/users/nmcclay/repos","events_url":"https://api.github.com/users/nmcclay/events{/privacy}","received_events_url":"https://api.github.com/users/nmcclay/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-12T19:46:13Z","updated_at":"2016-12-19T21:19:39Z","closed_at":null,"body":"For example an import like this will succeed:\r\n`target.import(target.bowerDirectory + '/spin.js/spin.js');`\r\n\r\nBut an import as specified in the [Ember-CLI Guide -> Environment specific assets](https://ember-cli.com/user-guide/#environment-specific-assets)  will fail:\r\n```\r\ntarget.import({\r\n    development: target.bowerDirectory + '/spin.js/spin.js',\r\n    production:  target.bowerDirectory + '/spin.js/spin.min.js',\r\n    distribution: target.bowerDirectory + '/spin.js/spin.min.js'\r\n});\r\n```\r\n\r\nError output:\r\n```\r\nasset.replace is not a function\r\nTypeError: asset.replace is not a function\r\n    at Class.import (/Users/nmcclay/git/my-ember-project/node_modules/ember-engines/lib/engine-addon.js:241:17)\r\n```\r\n\r\nClearly shows that its failing on this regex shim for non-lazyLoading engines:\r\nhttps://github.com/ember-engines/ember-engines/blob/master/lib/engine-addon.js#L241\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ember-engines/ember-engines/issues/comments/268081504","html_url":"https://github.com/ember-engines/ember-engines/issues/280#issuecomment-268081504","issue_url":"https://api.github.com/repos/ember-engines/ember-engines/issues/280","id":268081504,"user":{"login":"ima007","id":1145967,"avatar_url":"https://avatars.githubusercontent.com/u/1145967?v=3","gravatar_id":"","url":"https://api.github.com/users/ima007","html_url":"https://github.com/ima007","followers_url":"https://api.github.com/users/ima007/followers","following_url":"https://api.github.com/users/ima007/following{/other_user}","gists_url":"https://api.github.com/users/ima007/gists{/gist_id}","starred_url":"https://api.github.com/users/ima007/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ima007/subscriptions","organizations_url":"https://api.github.com/users/ima007/orgs","repos_url":"https://api.github.com/users/ima007/repos","events_url":"https://api.github.com/users/ima007/events{/privacy}","received_events_url":"https://api.github.com/users/ima007/received_events","type":"User","site_admin":false},"created_at":"2016-12-19T21:19:39Z","updated_at":"2016-12-19T21:19:39Z","body":"I actually created a PR for this here back on Nov 7, haven't verified quite yet, but feel free to take it on: https://github.com/ember-engines/ember-engines/pull/252"}}
{"actor":{"display_login":"ima007"}}