{"action":"created","issue":{"url":"https://api.github.com/repos/InfomediaLtd/angular2-materialize/issues/40","repository_url":"https://api.github.com/repos/InfomediaLtd/angular2-materialize","labels_url":"https://api.github.com/repos/InfomediaLtd/angular2-materialize/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/InfomediaLtd/angular2-materialize/issues/40/comments","events_url":"https://api.github.com/repos/InfomediaLtd/angular2-materialize/issues/40/events","html_url":"https://github.com/InfomediaLtd/angular2-materialize/issues/40","id":157340118,"number":40,"title":"Angular 2 Web pack starter production build not working","user":{"login":"Arkanayan","id":8224598,"avatar_url":"https://avatars.githubusercontent.com/u/8224598?v=3","gravatar_id":"","url":"https://api.github.com/users/Arkanayan","html_url":"https://github.com/Arkanayan","followers_url":"https://api.github.com/users/Arkanayan/followers","following_url":"https://api.github.com/users/Arkanayan/following{/other_user}","gists_url":"https://api.github.com/users/Arkanayan/gists{/gist_id}","starred_url":"https://api.github.com/users/Arkanayan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arkanayan/subscriptions","organizations_url":"https://api.github.com/users/Arkanayan/orgs","repos_url":"https://api.github.com/users/Arkanayan/repos","events_url":"https://api.github.com/users/Arkanayan/events{/privacy}","received_events_url":"https://api.github.com/users/Arkanayan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-05-28T14:00:41Z","updated_at":"2016-05-29T05:00:13Z","closed_at":null,"body":"Hi,\r\nI am using your angular2 webpack starter pack. Everything runs fine on dev build. But on production build everything that requires materialize javascript  not working. I am getting this error \r\n\r\nbrowser_adapter.js:77 TypeError: d.each is not a function\r\n    at e (materialize.js:236)\r\n    at HTMLDivElement.n (materialize.js:236)\r\n    at HTMLDivElement.<anonymous> (materialize.js:237)\r\n    at Function.v.extend.each (jquery.js:365)\r\n    at x [as velocity] (materialize.js:237)\r\n    at HTMLAnchorElement.<anonymous> (materialize.js:1306)\r\n    at HTMLUListElement.v.event.dispatch (jquery.js:4737)\r\n    at HTMLUListElement.g.handle (jquery.js:4549)\r\n    at ZoneDelegate.invokeTask (zone.js:356)\r\n    at Object.NgZoneImpl.inner.inner.fork.onInvokeTask (ng_zone_impl.js:36)\r\n\r\nI think this is because of UglifyJsPlugin on production build. This is my UglifyJsPlugin config\r\n\r\n new UglifyJsPlugin({\r\n      // beautify: true, //debug\r\n      mangle: false, //debug\r\n      dead_code: false, //debug\r\n      unused: false, //debug\r\n      deadCode: false, //debug\r\n      // compress: {\r\n      //   screw_ie8: true,\r\n      //   keep_fnames: true,\r\n      //   drop_debugger: false,\r\n      //   dead_code: false,\r\n      //   unused: false\r\n      // }, // debug\r\n      // comments: true, //debug\r\n\r\n      beautify: false, //prod\r\n\r\n  /*      mangle: {\r\n        screw_ie8 : true,\r\n        keep_fnames: true\r\n      }, //prod*/\r\n\r\n      compress: {\r\n        screw_ie8: true\r\n      }, //prod\r\n\r\n      exclude: ['/materialize.js/g'],\r\n      comments: false //prod\r\n    }),"},"comment":{"url":"https://api.github.com/repos/InfomediaLtd/angular2-materialize/issues/comments/222342856","html_url":"https://github.com/InfomediaLtd/angular2-materialize/issues/40#issuecomment-222342856","issue_url":"https://api.github.com/repos/InfomediaLtd/angular2-materialize/issues/40","id":222342856,"user":{"login":"Arkanayan","id":8224598,"avatar_url":"https://avatars.githubusercontent.com/u/8224598?v=3","gravatar_id":"","url":"https://api.github.com/users/Arkanayan","html_url":"https://github.com/Arkanayan","followers_url":"https://api.github.com/users/Arkanayan/followers","following_url":"https://api.github.com/users/Arkanayan/following{/other_user}","gists_url":"https://api.github.com/users/Arkanayan/gists{/gist_id}","starred_url":"https://api.github.com/users/Arkanayan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arkanayan/subscriptions","organizations_url":"https://api.github.com/users/Arkanayan/orgs","repos_url":"https://api.github.com/users/Arkanayan/repos","events_url":"https://api.github.com/users/Arkanayan/events{/privacy}","received_events_url":"https://api.github.com/users/Arkanayan/received_events","type":"User","site_admin":false},"created_at":"2016-05-29T05:00:13Z","updated_at":"2016-05-29T05:00:13Z","body":"If I point 'materialize' to global 'Materialize and disable alias 'materialize' to local script,\r\n\r\n```\r\n externals : {\r\n    \"materialize\": \"Materialize\"\r\n  },\r\n\r\n```\r\nand\r\n```\r\n    alias: {\r\n      materializecss: 'materialize-css/dist/css/materialize.css',\r\n      // materialize: 'materialize-css/dist/js/materialize.js',\r\n  }\r\n```\r\nI am getting this error \r\n`ORIGINAL EXCEPTION: Error: Couldn't find materialize function ''tabs' on element or the global Materialize object.`"}}
{"actor":{"display_login":"Arkanayan"}}