{"action":"created","issue":{"url":"https://api.github.com/repos/systemjs/systemjs/issues/740","labels_url":"https://api.github.com/repos/systemjs/systemjs/issues/740/labels{/name}","comments_url":"https://api.github.com/repos/systemjs/systemjs/issues/740/comments","events_url":"https://api.github.com/repos/systemjs/systemjs/issues/740/events","html_url":"https://github.com/systemjs/systemjs/issues/740","id":103851416,"number":740,"title":"On Safari, jQuery can block systemjs loading properly","user":{"login":"simonh1000","id":5256724,"avatar_url":"https://avatars.githubusercontent.com/u/5256724?v=3","gravatar_id":"","url":"https://api.github.com/users/simonh1000","html_url":"https://github.com/simonh1000","followers_url":"https://api.github.com/users/simonh1000/followers","following_url":"https://api.github.com/users/simonh1000/following{/other_user}","gists_url":"https://api.github.com/users/simonh1000/gists{/gist_id}","starred_url":"https://api.github.com/users/simonh1000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonh1000/subscriptions","organizations_url":"https://api.github.com/users/simonh1000/orgs","repos_url":"https://api.github.com/users/simonh1000/repos","events_url":"https://api.github.com/users/simonh1000/events{/privacy}","received_events_url":"https://api.github.com/users/simonh1000/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-29T13:24:03Z","updated_at":"2015-08-30T04:13:12Z","closed_at":null,"body":"I can't say whether this is a Safari or a Systemjs problem, as\r\n - my systemjs build runs on all browsers except Safari (especially on iOS); but\r\n - building the code with babel directly (e.g. dropping the export/import statements and using `concat`) instead of systemjs and it runs reliably in Safari.\r\n\r\nIn brief, [this site](http://af2015b-testingfun.rhcloud.com/recommendations) does not run in Safari.\r\n\r\nThis is the gulp I use to build\r\n```\r\ngulp.task('systemjsbundle', function (cb) {\r\n    builder.reset();\r\n    return builder.loadConfig('./assets/app/config.js')\r\n    .then(function() {\r\n        return builder.build('./assets/app/app/app.js', 'dist/scripts/build.js');\r\n    })\r\n    .catch( console.error );\r\n});\r\n```\r\nConfig.js\r\n```\r\nSystem.config({\r\n  baseURL: \"./assets/app\",\r\n  defaultJSExtensions: true,\r\n  transpiler: \"babel\",\r\n  babelOptions: {\r\n    \"optional\": [\r\n      \"runtime\",\r\n      \"optimisation.modules.system\"\r\n    ]\r\n  },\r\n  paths: {\r\n    \"*\": \"*\",\r\n    \"github:*\": \"jspm_packages/github/*\",\r\n    \"npm:*\": \"jspm_packages/npm/*\"\r\n  },\r\n```\r\nThe app runs on a wordpress site and has the following script tags (I've tried putting the jquery and `sage.js` (which uses the jQuery across my site above and below the other script tags which load the app.\r\n```\r\n<script type='text/javascript' src='http://af2015b-testingfun.rhcloud.com/wp-includes/js/jquery/jquery.js?ver=1.11.3'></script>\r\n<script type='text/javascript' src='http://af2015b-testingfun.rhcloud.com/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.2.1'></script>\r\n<script type='text/javascript' src='http://af2015b-testingfun.rhcloud.com/wp-content/plugins/responsify-wp/src/picturefill.2.3.1.min.js'></script>\r\n<script type='text/javascript' src='//maps.googleapis.com/maps/api/js?ver=1.0.0'></script>\r\n<script type='text/javascript' src='http://af2015b-testingfun.rhcloud.com/wp-content/themes/af2015/dist/scripts/system.js?ver=1.0.0'></script>\r\n<script type='text/javascript' src='http://af2015b-testingfun.rhcloud.com/wp-content/themes/af2015/dist/scripts/config.js?ver=1.0.0'></script>\r\n<script type='text/javascript'>\r\n/* <![CDATA[ */\r\nvar localizedVars = {\"baseURL\":\"http:\\/\\/af2015b-testingfun.rhcloud.com\\/wp-content\\/themes\\/af2015\"};\r\n/* ]]> */\r\n</script>\r\n<script type='text/javascript' src='http://af2015b-testingfun.rhcloud.com/wp-content/themes/af2015/dist/scripts/build.js?ver=1.0.0'></script>\r\n<script type='text/javascript' src='http://af2015b-testingfun.rhcloud.com/wp-content/themes/af2015/dist/scripts/loader.js?ver=1.0.0'></script>\r\n<script type='text/javascript' src='http://af2015b-testingfun.rhcloud.com/wp-content/themes/af2015/dist/scripts/modernizr.js'></script>\r\n<script type='text/javascript' src='http://af2015b-testingfun.rhcloud.com/wp-content/themes/af2015/dist/scripts/sage.js'></script>\r\n```\r\n`loader.js` is a one-liner\r\n\r\n    System.import('app/app.js');\r\n\r\nI've boiled down the problem to this line of php, which writes the script tag into the page\r\n\r\n    wp_enqueue_script('main', asset_path('scripts/sage.js'), ['jquery'], null, false);\r\n\r\nIf I remove the jquery reference, the jquery script tags are not added and the the page loads in Safari (although sage.js is then useless because it relies on jquery). I've used my own version of jquery as well as that of Wordpress with the same effect.\r\n\r\nI realise this is a bizarre bug, and can't prove systemjs is to blame, but am looking for pointers as its a real problemfor me."},"comment":{"url":"https://api.github.com/repos/systemjs/systemjs/issues/comments/136083745","html_url":"https://github.com/systemjs/systemjs/issues/740#issuecomment-136083745","issue_url":"https://api.github.com/repos/systemjs/systemjs/issues/740","id":136083745,"user":{"login":"simonh1000","id":5256724,"avatar_url":"https://avatars.githubusercontent.com/u/5256724?v=3","gravatar_id":"","url":"https://api.github.com/users/simonh1000","html_url":"https://github.com/simonh1000","followers_url":"https://api.github.com/users/simonh1000/followers","following_url":"https://api.github.com/users/simonh1000/following{/other_user}","gists_url":"https://api.github.com/users/simonh1000/gists{/gist_id}","starred_url":"https://api.github.com/users/simonh1000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonh1000/subscriptions","organizations_url":"https://api.github.com/users/simonh1000/orgs","repos_url":"https://api.github.com/users/simonh1000/repos","events_url":"https://api.github.com/users/simonh1000/events{/privacy}","received_events_url":"https://api.github.com/users/simonh1000/received_events","type":"User","site_admin":false},"created_at":"2015-08-30T04:13:12Z","updated_at":"2015-08-30T04:13:12Z","body":"Whoops - I see I did not give the full URL - [this site](http://af2015b-testingfun.rhcloud.com/recommendations)"}}