{"action":"opened","issue":{"url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/3890","labels_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/3890/labels{/name}","comments_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/3890/comments","events_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/3890/events","html_url":"https://github.com/HaxeFoundation/haxe/issues/3890","id":58307396,"number":3890,"title":"@:jsRequire does not work with `-dce no`","user":{"login":"fponticelli","id":163915,"avatar_url":"https://avatars.githubusercontent.com/u/163915?v=3","gravatar_id":"","url":"https://api.github.com/users/fponticelli","html_url":"https://github.com/fponticelli","followers_url":"https://api.github.com/users/fponticelli/followers","following_url":"https://api.github.com/users/fponticelli/following{/other_user}","gists_url":"https://api.github.com/users/fponticelli/gists{/gist_id}","starred_url":"https://api.github.com/users/fponticelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fponticelli/subscriptions","organizations_url":"https://api.github.com/users/fponticelli/orgs","repos_url":"https://api.github.com/users/fponticelli/repos","events_url":"https://api.github.com/users/fponticelli/events{/privacy}","received_events_url":"https://api.github.com/users/fponticelli/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/HaxeFoundation/haxe/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-20T03:51:04Z","updated_at":"2015-02-20T03:51:04Z","closed_at":null,"body":"as per subject `-dce no` removes `require()` from the output.\r\n\r\nExample `build.hxml`:\r\n\r\n```hxml\r\n-js out.js\r\n-main Main\r\n-dce no\r\n```\r\n\r\nExample `Main.hx`:\r\n\r\n```haxe\r\nclass Main {\r\n  static function main() {\r\n    trace(FS.statSync(\"out.js\"));\r\n  }\r\n}\r\n\r\n@:jsRequire(\"fs\")\r\nextern class FS {\r\n  static function statSync(path : String) : Dynamic;\r\n}\r\n```"}}