{"action":"closed","issue":{"url":"https://api.github.com/repos/rails/sprockets/issues/156","repository_url":"https://api.github.com/repos/rails/sprockets","labels_url":"https://api.github.com/repos/rails/sprockets/issues/156/labels{/name}","comments_url":"https://api.github.com/repos/rails/sprockets/issues/156/comments","events_url":"https://api.github.com/repos/rails/sprockets/issues/156/events","html_url":"https://github.com/rails/sprockets/issues/156","id":116448106,"number":156,"title":"Cannot use require directive from registered transforms/preprocessors.","user":{"login":"matthewlehner","id":136013,"avatar_url":"https://avatars.githubusercontent.com/u/136013?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewlehner","html_url":"https://github.com/matthewlehner","followers_url":"https://api.github.com/users/matthewlehner/followers","following_url":"https://api.github.com/users/matthewlehner/following{/other_user}","gists_url":"https://api.github.com/users/matthewlehner/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewlehner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewlehner/subscriptions","organizations_url":"https://api.github.com/users/matthewlehner/orgs","repos_url":"https://api.github.com/users/matthewlehner/repos","events_url":"https://api.github.com/users/matthewlehner/events{/privacy}","received_events_url":"https://api.github.com/users/matthewlehner/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2015-11-11T23:57:40Z","updated_at":"2016-08-25T17:09:50Z","closed_at":"2016-08-25T17:09:50Z","body":"This is coming from my experience with sprockets-es6, which is using the recommended  preprocessor/transform syntax rather than registering as an engine.\r\n\r\nCalling `//=require somefile` will result in:\r\n\r\n```ruby\r\nSprockets::FileNotFound: couldn't find file 'es5_file' with type 'text/ecmascript-6'\r\n```\r\n\r\nsprockets-es6 is registered like this:\r\n```ruby\r\nregister_mime_type 'text/ecmascript-6', extensions: ['.es6'], charset: :unicode\r\nregister_transformer 'text/ecmascript-6', 'application/javascript', ES6\r\nregister_preprocessor 'text/ecmascript-6', DirectiveProcessor\r\nregister_engine '.es6', ES6\r\n```\r\n\r\nbut changing to simple an engine fixes the behaviour:\r\n```ruby\r\nregister_engine '.es6', ES6, mime_type: 'application/javascript'\r\n```\r\n\r\nI've opened another issue at TannerRogalsky/sprockets-es6#19, but it feels like this is an issue in the 3.x branch of Sprockets."}}
{"actor":{"display_login":"schneems"}}