{"action":"closed","issue":{"url":"https://api.github.com/repos/requirejs/r.js/issues/962","repository_url":"https://api.github.com/repos/requirejs/r.js","labels_url":"https://api.github.com/repos/requirejs/r.js/issues/962/labels{/name}","comments_url":"https://api.github.com/repos/requirejs/r.js/issues/962/comments","events_url":"https://api.github.com/repos/requirejs/r.js/issues/962/events","html_url":"https://github.com/requirejs/r.js/issues/962","id":238128581,"number":962,"title":"File produced by build script doesn't appear to do anything","user":{"login":"jslegers","id":883647,"avatar_url":"https://avatars3.githubusercontent.com/u/883647?v=3","gravatar_id":"","url":"https://api.github.com/users/jslegers","html_url":"https://github.com/jslegers","followers_url":"https://api.github.com/users/jslegers/followers","following_url":"https://api.github.com/users/jslegers/following{/other_user}","gists_url":"https://api.github.com/users/jslegers/gists{/gist_id}","starred_url":"https://api.github.com/users/jslegers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jslegers/subscriptions","organizations_url":"https://api.github.com/users/jslegers/orgs","repos_url":"https://api.github.com/users/jslegers/repos","events_url":"https://api.github.com/users/jslegers/events{/privacy}","received_events_url":"https://api.github.com/users/jslegers/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-06-23T12:30:01Z","updated_at":"2017-07-08T10:09:05Z","closed_at":"2017-07-08T10:09:05Z","body":"## The source\r\n\r\nMy `src` has the following structure :\r\n````\r\nsrc\r\n|-- index.html\r\n|-- js\r\n|    |-- amdconfig.js\r\n|    |-- main.js\r\n|    |-- ...\r\n|-- lib\r\n     |-- require\r\n     |    |-- require.js\r\n     |-- d3\r\n     |    |-- d3.js\r\n     |-- luciad\r\n          |-- ...\r\n```` \r\n\r\nMy `index.html` contains the following code :\r\n````html\r\n<script src=\"./lib/requirejs/require.js\" type=\"text/javascript\"></script><!-- require.js -->\r\n<script src=\"./js/amdconfig.js\" type=\"text/javascript\"></script><!-- require.js config -->\r\n<script type=\"text/javascript\">\r\n    require([\"app/js/main\"]); /* main module */\r\n</script>\r\n````\r\n\r\nMy `amdconfig.js` file contains the following code :\r\n\r\n```js\r\n(function(configure, app) {\r\n  var lib = [app, \"lib\"].join(\"/\");\r\n  configure({\r\n    baseUrl : app,\r\n    urlArgs : \"bust=\" + (new Date()).getTime(),\r\n    packages : [{\r\n      name : \"requirejs\",\r\n      location : [lib, \"requirejs\"].join(\"/\")\r\n    }, {\r\n      name : \"luciad\",\r\n      location : [lib, \"luciad\"].join(\"/\")\r\n    }, {\r\n      name : \"d3\",\r\n      location : [lib, \"d3\"].join(\"/\")\r\n    }, {\r\n      name : \"app\",\r\n      location : app\r\n    }],\r\n    cache : {}\r\n  })\r\n})(\r\n  require.config ? require.config /* RequireJS */ : require, /* Dojo */\r\n  '.'\r\n)\r\n```\r\n________________\r\n\r\n### My build script\r\n\r\nI have a build script with the following structure :\r\n````\r\nbuilder\r\n|-- build.js\r\n|-- package.json\r\n````\r\n\r\nIf has the following code :\r\n\r\n```js\r\nrequire('requirejs').optimize({\r\n  baseUrl: '../src',\r\n  paths: {\r\n    main: 'main',\r\n    requirejs : './lib/requirejs',\r\n    luciad : './lib/luciad',\r\n    d3 : './lib/d3',\r\n    app : './'\r\n  },\r\n  name: 'js/main',\r\n  out : '../dist/main.js',\r\n  optimize: \"uglify2\",\r\n  uglify2: {\r\n    output: {\r\n      beautify: false\r\n    },\r\n    compress: {},\r\n    warnings: true,\r\n    mangle: true\r\n  }\r\n}, function (buildResponse) {\r\n  console.log(buildResponse);\r\n});\r\n```\r\n________________\r\n\r\n### My problem\r\n\r\nThe build script does produce a minified `main.js` file and outputs the list of included files in the console, as expected.\r\n\r\nHowever, when I replace the `main.js` of my `src` with the `main.js` I just generated, nothing happens. My app doesn't start and I'm not getting any errors.\r\n\r\nWhat am I missing here?\r\n\r\n________\r\n\r\n### Note \r\nIf I don't minify my code, I get the same behavior."}}
{"actor":{"display_login":"jslegers"}}