{"action":"created","issue":{"url":"https://api.github.com/repos/monounity/karma-typescript/issues/42","repository_url":"https://api.github.com/repos/monounity/karma-typescript","labels_url":"https://api.github.com/repos/monounity/karma-typescript/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/monounity/karma-typescript/issues/42/comments","events_url":"https://api.github.com/repos/monounity/karma-typescript/issues/42/events","html_url":"https://github.com/monounity/karma-typescript/issues/42","id":192874307,"number":42,"title":"Loading the SystemJS vs. CommonJS style is causing issues with momentJS","user":{"login":"Bjeaurn","id":1345395,"avatar_url":"https://avatars.githubusercontent.com/u/1345395?v=3","gravatar_id":"","url":"https://api.github.com/users/Bjeaurn","html_url":"https://github.com/Bjeaurn","followers_url":"https://api.github.com/users/Bjeaurn/followers","following_url":"https://api.github.com/users/Bjeaurn/following{/other_user}","gists_url":"https://api.github.com/users/Bjeaurn/gists{/gist_id}","starred_url":"https://api.github.com/users/Bjeaurn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bjeaurn/subscriptions","organizations_url":"https://api.github.com/users/Bjeaurn/orgs","repos_url":"https://api.github.com/users/Bjeaurn/repos","events_url":"https://api.github.com/users/Bjeaurn/events{/privacy}","received_events_url":"https://api.github.com/users/Bjeaurn/received_events","type":"User","site_admin":false},"labels":[{"id":429965888,"url":"https://api.github.com/repos/monounity/karma-typescript/labels/bug","name":"bug","color":"ee0701","default":true},{"id":429965893,"url":"https://api.github.com/repos/monounity/karma-typescript/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/monounity/karma-typescript/milestones/12","html_url":"https://github.com/monounity/karma-typescript/milestone/12","labels_url":"https://api.github.com/repos/monounity/karma-typescript/milestones/12/labels","id":2198841,"number":12,"title":"2.1.6","description":"","creator":{"login":"erikbarke","id":5539280,"avatar_url":"https://avatars.githubusercontent.com/u/5539280?v=3","gravatar_id":"","url":"https://api.github.com/users/erikbarke","html_url":"https://github.com/erikbarke","followers_url":"https://api.github.com/users/erikbarke/followers","following_url":"https://api.github.com/users/erikbarke/following{/other_user}","gists_url":"https://api.github.com/users/erikbarke/gists{/gist_id}","starred_url":"https://api.github.com/users/erikbarke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikbarke/subscriptions","organizations_url":"https://api.github.com/users/erikbarke/orgs","repos_url":"https://api.github.com/users/erikbarke/repos","events_url":"https://api.github.com/users/erikbarke/events{/privacy}","received_events_url":"https://api.github.com/users/erikbarke/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":2,"state":"open","created_at":"2016-12-15T14:32:03Z","updated_at":"2016-12-21T06:56:36Z","due_on":"2017-12-01T08:00:00Z","closed_at":null},"comments":12,"created_at":"2016-12-01T15:18:01Z","updated_at":"2016-12-22T04:47:15Z","closed_at":null,"body":"Hi, we're using Moment in a project. \r\n\r\nIf we want it to not throw errors  in our application, we use `import moment from 'moment'` and be done with it. \r\n\r\nThis will cause errors on the karma-typescript runner with errors like:\r\n`search/search.component.ts(5,8): error TS1192: Module ''moment'' has no default export.`\r\n\r\nWhen we change it to `import * as moment from 'moment'`, suddenly all tests run but the application throws errors when we try to use anything related with moment. Basically saying it cannot be found and it doesn't have any exported members.\r\n\r\nI've been tinkering around with the `karma.conf.js` to try and instruct the Karma-Typescript part to handle `import moment from 'moment'` the same way the SystemJS is doing right now, but up until no luck.\r\n\r\nAny suggestions?\r\n\r\n```\r\nmodule.exports = function (config) {\r\n  config.set({\r\n\r\n    frameworks: [\"jasmine\", \"karma-typescript\"],\r\n    logLevel: config.LOG_INFO,\r\n\r\n    files: [\r\n      {pattern: 'app/assets/base.spec.ts'},\r\n      {pattern: \"app/assets/**/*.ts\"}\r\n    ],\r\n\r\n    exclude: [\r\n      \"node_modules\",\r\n      \"target/node-modules/webjars/\",\r\n      \"node-modules\"\r\n    ],\r\n\r\n    map: [\r\n      {'moment': 'node_modules/moment/moment.js' }\r\n    ],\r\n\r\n\r\n    preprocessors: {\r\n      \"app/assets/**/*.ts\": [\"karma-typescript\"]\r\n    },\r\n\r\n    exclude: [\r\n      'app/assets/main.ts'\r\n    ],\r\n\r\n    reporters: [\"progress\", \"karma-typescript\"],\r\n\r\n    karmaTypescriptConfig: {\r\n      tsconfig: './tsconfig.json',\r\n      compilerOptions: {\r\n        inlineSourceMap: true,\r\n        module: \"commonjs\" // overrides tsconfig\r\n      },\r\n      exclude: [\"broken\"],\r\n      bundlerOptions: {\r\n        ignoredModuleNames: [\"react/addons\"],\r\n      },\r\n      disableCodeCoverageInstrumentation: false,\r\n      excludeFromCoverage: /\\.(d|spec|test)\\.ts/,\r\n      remapOptions: {\r\n        warn: function(message){\r\n          console.log(message);\r\n        }\r\n      },\r\n      reports:\r\n      {\r\n        \"html\": \"coverage\",\r\n        \"text-summary\": \"\"\r\n      },\r\n      transformPath: function(filepath) {\r\n        return filepath.replace(/\\.(ts|tsx)$/, \".js\");\r\n      }\r\n    },\r\n\r\n    coverageReporter: {\r\n      type : 'html',\r\n      dir : 'coverage/'\r\n    },\r\n\r\n    browsers: [\"Chrome\"]\r\n  });\r\n};\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/monounity/karma-typescript/issues/comments/268717618","html_url":"https://github.com/monounity/karma-typescript/issues/42#issuecomment-268717618","issue_url":"https://api.github.com/repos/monounity/karma-typescript/issues/42","id":268717618,"user":{"login":"erikbarke","id":5539280,"avatar_url":"https://avatars.githubusercontent.com/u/5539280?v=3","gravatar_id":"","url":"https://api.github.com/users/erikbarke","html_url":"https://github.com/erikbarke","followers_url":"https://api.github.com/users/erikbarke/followers","following_url":"https://api.github.com/users/erikbarke/following{/other_user}","gists_url":"https://api.github.com/users/erikbarke/gists{/gist_id}","starred_url":"https://api.github.com/users/erikbarke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikbarke/subscriptions","organizations_url":"https://api.github.com/users/erikbarke/orgs","repos_url":"https://api.github.com/users/erikbarke/repos","events_url":"https://api.github.com/users/erikbarke/events{/privacy}","received_events_url":"https://api.github.com/users/erikbarke/received_events","type":"User","site_admin":false},"created_at":"2016-12-22T04:47:15Z","updated_at":"2016-12-22T04:47:15Z","body":"Does it work if you try the latest from the 2.1.6 branch, `npm install https://github.com/monounity/karma-typescript.git#2.1.6`?"}}
{"actor":{"display_login":"erikbarke"}}