{"action":"created","issue":{"url":"https://api.github.com/repos/stealjs/steal/issues/681","repository_url":"https://api.github.com/repos/stealjs/steal","labels_url":"https://api.github.com/repos/stealjs/steal/issues/681/labels{/name}","comments_url":"https://api.github.com/repos/stealjs/steal/issues/681/comments","events_url":"https://api.github.com/repos/stealjs/steal/issues/681/events","html_url":"https://github.com/stealjs/steal/issues/681","id":153133717,"number":681,"title":"Angular2 app fails to load when minified by steal-tools","user":{"login":"wrldtrvllr","id":18408500,"avatar_url":"https://avatars.githubusercontent.com/u/18408500?v=3","gravatar_id":"","url":"https://api.github.com/users/wrldtrvllr","html_url":"https://github.com/wrldtrvllr","followers_url":"https://api.github.com/users/wrldtrvllr/followers","following_url":"https://api.github.com/users/wrldtrvllr/following{/other_user}","gists_url":"https://api.github.com/users/wrldtrvllr/gists{/gist_id}","starred_url":"https://api.github.com/users/wrldtrvllr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wrldtrvllr/subscriptions","organizations_url":"https://api.github.com/users/wrldtrvllr/orgs","repos_url":"https://api.github.com/users/wrldtrvllr/repos","events_url":"https://api.github.com/users/wrldtrvllr/events{/privacy}","received_events_url":"https://api.github.com/users/wrldtrvllr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-04T22:55:15Z","updated_at":"2016-05-04T23:38:38Z","closed_at":null,"body":"Hello,\r\n\r\nI've experimented with the Angular2 tutorial (https://github.com/angular/quickstart) and stealjs with npm plugin, which worked out quite well. However, when I tried to build the app with steal-tools, the resulting bundle fails to load with the following error message:\r\n\r\n```\r\nTypeError: Error loading \"app/main\" at http://localhost:3000/app/main.js(…) \"TypeError: Error loading \"app/main\" at http://localhost:3000/app/main.js\r\nModule @angular/core not declared as a dependency.\r\n    at http://localhost:3000/node_modules/steal/steal.js:3575:13\r\n    at http://localhost:3000/node_modules/steal/steal.js:4216:16\r\n    at Function.<anonymous> (http://localhost:3000/dist/bundles/app/main.js:250:1316)\r\n    at define.execute (http://localhost:3000/node_modules/steal/steal.js:4299:32)\r\n    at linkDynamicModule (http://localhost:3000/node_modules/steal/steal.js:3569:32)\r\n    at linkDynamicModule (http://localhost:3000/node_modules/steal/steal.js:3563:11)\r\n    at linkDynamicModule (http://localhost:3000/node_modules/steal/steal.js:3563:11)\r\n    at linkDynamicModule (http://localhost:3000/node_modules/steal/steal.js:3563:11)\r\n    at linkDynamicModule (http://localhost:3000/node_modules/steal/steal.js:3563:11)\r\n    at linkDynamicModule (http://localhost:3000/node_modules/steal/steal.js:3563:11)\"\r\n```\r\n\r\nThis is my package.json:\r\n\r\n```\r\n{\r\n  \"name\": \"demo\",\r\n  \"version\": \"1.0.0\",\r\n  \"description\": \"QuickStart package.json from the documentation, supplemented with testing support\",\r\n  \"scripts\": {\r\n    \"start\": \"tsc && concurrently \\\"tsc -w\\\" \\\"lite-server\\\" \",\r\n    \"docker-build\": \"docker build -t ng2-quickstart .\",\r\n    \"docker\": \"npm run docker-build && docker run -it --rm -p 3000:3000 -p 3001:3001 ng2-quickstart\",\r\n    \"e2e\": \"tsc && concurrently \\\"http-server\\\" \\\"protractor protractor.config.js\\\"\",\r\n    \"lint\": \"tslint ./app/**/*.ts -t verbose\",\r\n    \"lite\": \"lite-server\",\r\n    \"build\": \"steal-tools\",\r\n    \"postinstall\": \"typings install\",\r\n    \"test\": \"tsc && concurrently \\\"tsc -w\\\" \\\"karma start karma.conf.js\\\"\",\r\n    \"tsc\": \"tsc\",\r\n    \"tsc:w\": \"tsc -w\",\r\n    \"typings\": \"typings\",\r\n    \"webdriver:update\": \"webdriver-manager update\"\r\n  },\r\n  \"keywords\": [],\r\n  \"author\": \"\",\r\n  \"license\": \"ISC\",\r\n  \"dependencies\": {\r\n    \"@angular/common\": \"2.0.0-rc.1\",\r\n    \"@angular/compiler\": \"2.0.0-rc.1\",\r\n    \"@angular/core\": \"2.0.0-rc.1\",\r\n    \"@angular/http\": \"2.0.0-rc.1\",\r\n    \"@angular/platform-browser\": \"2.0.0-rc.1\",\r\n    \"@angular/platform-browser-dynamic\": \"2.0.0-rc.1\",\r\n    \"@angular/router\": \"2.0.0-rc.1\",\r\n    \"@angular/router-deprecated\": \"2.0.0-rc.1\",\r\n    \"@angular/upgrade\": \"2.0.0-rc.1\",\r\n    \"angular2-in-memory-web-api\": \"0.0.7\",\r\n    \"bootstrap\": \"^3.3.6\",\r\n    \"es6-shim\": \"^0.35.0\",\r\n    \"reflect-metadata\": \"^0.1.3\",\r\n    \"rxjs\": \"5.0.0-beta.6\",\r\n    \"steal\": \"^0.16.4\",\r\n    \"systemjs\": \"0.19.27\",\r\n    \"zone.js\": \"^0.6.12\"\r\n  },\r\n  \"devDependencies\": {\r\n    \"canonical-path\": \"0.0.2\",\r\n    \"concurrently\": \"^2.0.0\",\r\n    \"http-server\": \"^0.9.0\",\r\n    \"jasmine-core\": \"~2.4.1\",\r\n    \"karma\": \"^0.13.22\",\r\n    \"karma-chrome-launcher\": \"^0.2.3\",\r\n    \"karma-cli\": \"^0.1.2\",\r\n    \"karma-htmlfile-reporter\": \"^0.2.2\",\r\n    \"karma-jasmine\": \"^0.3.8\",\r\n    \"lite-server\": \"^2.2.0\",\r\n    \"lodash\": \"^4.11.1\",\r\n    \"protractor\": \"^3.3.0\",\r\n    \"rimraf\": \"^2.5.2\",\r\n    \"steal-tools\": \"^0.16.2\",\r\n    \"tslint\": \"^3.7.4\",\r\n    \"typescript\": \"^1.8.10\",\r\n    \"typings\": \"^0.8.1\"\r\n  },\r\n  \"main\": \"app/main\",\r\n  \"system\": {\r\n    \"npmAlgorithm\": \"flat\",\r\n    \"npmIgnore\": [\r\n      \"devDependencies\"\r\n    ]\r\n  },\r\n  \"repository\": {}\r\n}\r\n```\r\nIt turns out that disabling the minify option makes the bundle work. However, I'd like to use minification as the Angular2 libs are quite big. Any ideas? Or is this maybe a bug in Angular2?"},"comment":{"url":"https://api.github.com/repos/stealjs/steal/issues/comments/217039545","html_url":"https://github.com/stealjs/steal/issues/681#issuecomment-217039545","issue_url":"https://api.github.com/repos/stealjs/steal/issues/681","id":217039545,"user":{"login":"justinbmeyer","id":78602,"avatar_url":"https://avatars.githubusercontent.com/u/78602?v=3","gravatar_id":"","url":"https://api.github.com/users/justinbmeyer","html_url":"https://github.com/justinbmeyer","followers_url":"https://api.github.com/users/justinbmeyer/followers","following_url":"https://api.github.com/users/justinbmeyer/following{/other_user}","gists_url":"https://api.github.com/users/justinbmeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/justinbmeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinbmeyer/subscriptions","organizations_url":"https://api.github.com/users/justinbmeyer/orgs","repos_url":"https://api.github.com/users/justinbmeyer/repos","events_url":"https://api.github.com/users/justinbmeyer/events{/privacy}","received_events_url":"https://api.github.com/users/justinbmeyer/received_events","type":"User","site_admin":false},"created_at":"2016-05-04T23:38:38Z","updated_at":"2016-05-04T23:38:38Z","body":"We use uglify for minification. Maybe search there real quick if there are posted issues. Otherwise we will check it out. \n\nSent from my iPhone\n\n> On May 4, 2016, at 5:55 PM, wrldtrvllr <notifications@github.com> wrote:\n> \n> Hello,\n> \n> I've experimented with the Angular2 tutorial (https://github.com/angular/quickstart) and stealjs with npm plugin, which worked out quite well. However, when I tried to build the app with steal-tools, the resulting bundle fails to load with the following error message:\n> \n> TypeError: Error loading \"app/main\" at http://localhost:3000/app/main.js(…) \"TypeError: Error loading \"app/main\" at http://localhost:3000/app/main.js\n> Module @angular/core not declared as a dependency.\n>     at http://localhost:3000/node_modules/steal/steal.js:3575:13\n>     at http://localhost:3000/node_modules/steal/steal.js:4216:16\n>     at Function.<anonymous> (http://localhost:3000/dist/bundles/app/main.js:250:1316)\n>     at define.execute (http://localhost:3000/node_modules/steal/steal.js:4299:32)\n>     at linkDynamicModule (http://localhost:3000/node_modules/steal/steal.js:3569:32)\n>     at linkDynamicModule (http://localhost:3000/node_modules/steal/steal.js:3563:11)\n>     at linkDynamicModule (http://localhost:3000/node_modules/steal/steal.js:3563:11)\n>     at linkDynamicModule (http://localhost:3000/node_modules/steal/steal.js:3563:11)\n>     at linkDynamicModule (http://localhost:3000/node_modules/steal/steal.js:3563:11)\n>     at linkDynamicModule (http://localhost:3000/node_modules/steal/steal.js:3563:11)\"\n> This is my package.json:\n> \n> {\n>   \"name\": \"demo\",\n>   \"version\": \"1.0.0\",\n>   \"description\": \"QuickStart package.json from the documentation, supplemented with testing support\",\n>   \"scripts\": {\n>     \"start\": \"tsc && concurrently \\\"tsc -w\\\" \\\"lite-server\\\" \",\n>     \"docker-build\": \"docker build -t ng2-quickstart .\",\n>     \"docker\": \"npm run docker-build && docker run -it --rm -p 3000:3000 -p 3001:3001 ng2-quickstart\",\n>     \"e2e\": \"tsc && concurrently \\\"http-server\\\" \\\"protractor protractor.config.js\\\"\",\n>     \"lint\": \"tslint ./app/**/*.ts -t verbose\",\n>     \"lite\": \"lite-server\",\n>     \"build\": \"steal-tools\",\n>     \"postinstall\": \"typings install\",\n>     \"test\": \"tsc && concurrently \\\"tsc -w\\\" \\\"karma start karma.conf.js\\\"\",\n>     \"tsc\": \"tsc\",\n>     \"tsc:w\": \"tsc -w\",\n>     \"typings\": \"typings\",\n>     \"webdriver:update\": \"webdriver-manager update\"\n>   },\n>   \"keywords\": [],\n>   \"author\": \"\",\n>   \"license\": \"ISC\",\n>   \"dependencies\": {\n>     \"@angular/common\": \"2.0.0-rc.1\",\n>     \"@angular/compiler\": \"2.0.0-rc.1\",\n>     \"@angular/core\": \"2.0.0-rc.1\",\n>     \"@angular/http\": \"2.0.0-rc.1\",\n>     \"@angular/platform-browser\": \"2.0.0-rc.1\",\n>     \"@angular/platform-browser-dynamic\": \"2.0.0-rc.1\",\n>     \"@angular/router\": \"2.0.0-rc.1\",\n>     \"@angular/router-deprecated\": \"2.0.0-rc.1\",\n>     \"@angular/upgrade\": \"2.0.0-rc.1\",\n>     \"angular2-in-memory-web-api\": \"0.0.7\",\n>     \"bootstrap\": \"^3.3.6\",\n>     \"es6-shim\": \"^0.35.0\",\n>     \"reflect-metadata\": \"^0.1.3\",\n>     \"rxjs\": \"5.0.0-beta.6\",\n>     \"steal\": \"^0.16.4\",\n>     \"systemjs\": \"0.19.27\",\n>     \"zone.js\": \"^0.6.12\"\n>   },\n>   \"devDependencies\": {\n>     \"canonical-path\": \"0.0.2\",\n>     \"concurrently\": \"^2.0.0\",\n>     \"http-server\": \"^0.9.0\",\n>     \"jasmine-core\": \"~2.4.1\",\n>     \"karma\": \"^0.13.22\",\n>     \"karma-chrome-launcher\": \"^0.2.3\",\n>     \"karma-cli\": \"^0.1.2\",\n>     \"karma-htmlfile-reporter\": \"^0.2.2\",\n>     \"karma-jasmine\": \"^0.3.8\",\n>     \"lite-server\": \"^2.2.0\",\n>     \"lodash\": \"^4.11.1\",\n>     \"protractor\": \"^3.3.0\",\n>     \"rimraf\": \"^2.5.2\",\n>     \"steal-tools\": \"^0.16.2\",\n>     \"tslint\": \"^3.7.4\",\n>     \"typescript\": \"^1.8.10\",\n>     \"typings\": \"^0.8.1\"\n>   },\n>   \"main\": \"app/main\",\n>   \"system\": {\n>     \"npmAlgorithm\": \"flat\",\n>     \"npmIgnore\": [\n>       \"devDependencies\"\n>     ]\n>   },\n>   \"repository\": {}\n> }\n> It turns out that disabling the minify option makes the bundle work. However, I'd like to use minification as the Angular2 libs are quite big. Any ideas? Or is this maybe a bug in Angular2?\n> \n> —\n> You are receiving this because you are subscribed to this thread.\n> Reply to this email directly or view it on GitHub\n> \n"}}