{"_id":"typescript-loader","_rev":"3348376","name":"typescript-loader","description":"TypeScript Webpack Loader","dist-tags":{"latest":"1.1.3"},"maintainers":[{"name":"andreypopp","email":"8mayday@gmail.com"},{"name":"jgoz","email":""}],"time":{"modified":"2024-08-07T03:55:39.000Z","created":"2014-04-11T07:15:07.793Z","1.1.3":"2015-03-22T09:58:12.826Z","1.1.2":"2015-02-21T06:51:20.942Z","1.1.1":"2015-02-16T16:13:48.926Z","1.1.0":"2015-02-10T11:48:19.950Z","1.0.0":"2015-01-25T06:38:53.057Z","0.1.2":"2014-07-18T17:22:13.221Z","0.1.1":"2014-06-07T06:02:31.092Z","0.1.0":"2014-06-06T21:08:41.801Z","0.0.0":"2014-04-11T07:15:07.793Z"},"users":{},"author":{"name":"Andrey Popp","email":"me@andreypopp.com"},"repository":{"type":"git","url":"https://github.com/andreypopp/typescript-loader"},"versions":{"1.1.3":{"name":"typescript-loader","version":"1.1.3","description":"TypeScript Webpack Loader","main":"lib/index.js","directories":{"example":"example"},"dependencies":{"bluebird":"^2.7.1","loader-utils":"^0.2.6","object-assign":"^2.0.0","typescript":"^1.4.1"},"devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/andreypopp/typescript-loader"},"keywords":["webpack","loader","webpack-loader","typescript"],"author":{"name":"Andrey Popp","email":"me@andreypopp.com"},"license":"MIT","bugs":{"url":"https://github.com/andreypopp/typescript-loader/issues"},"homepage":"https://github.com/andreypopp/typescript-loader","gitHead":"cebc7715dd3c8cd0bb983283cec7870ddfad24a0","_id":"typescript-loader@1.1.3","_shasum":"5ff7e67cb3ba592519014aacc1aaf666a709de01","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.10.33","_npmUser":{"name":"andreypopp","email":"8mayday@gmail.com"},"maintainers":[{"name":"andreypopp","email":"8mayday@gmail.com"},{"name":"jgoz","email":""}],"dist":{"shasum":"5ff7e67cb3ba592519014aacc1aaf666a709de01","size":12293,"noattachment":false,"key":"/typescript-loader/-/typescript-loader-1.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/typescript-loader/download/typescript-loader-1.1.3.tgz"},"publish_time":1427018292826,"_hasShrinkwrap":false,"_cnpm_publish_time":1427018292826,"_cnpmcore_publish_time":"2021-12-16T22:11:46.795Z"},"1.1.2":{"name":"typescript-loader","version":"1.1.2","description":"TypeScript Webpack Loader","main":"lib/index.js","directories":{"example":"example"},"dependencies":{"bluebird":"^2.7.1","loader-utils":"^0.2.6","object-assign":"^2.0.0","typescript":"^1.4.1"},"devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/andreypopp/typescript-loader"},"keywords":["webpack","loader","webpack-loader","typescript"],"author":{"name":"Andrey Popp","email":"me@andreypopp.com"},"license":"MIT","bugs":{"url":"https://github.com/andreypopp/typescript-loader/issues"},"homepage":"https://github.com/andreypopp/typescript-loader","gitHead":"0d069e1392fbc31c2dfaca017282c440fdd2c1a1","_id":"typescript-loader@1.1.2","_shasum":"73312a48294fadd34ee5fb5b4fee7c93e908cfcf","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.10.33","_npmUser":{"name":"andreypopp","email":"8mayday@gmail.com"},"maintainers":[{"name":"andreypopp","email":"8mayday@gmail.com"},{"name":"jgoz","email":""}],"dist":{"shasum":"73312a48294fadd34ee5fb5b4fee7c93e908cfcf","size":11276,"noattachment":false,"key":"/typescript-loader/-/typescript-loader-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/typescript-loader/download/typescript-loader-1.1.2.tgz"},"publish_time":1424501480942,"_hasShrinkwrap":false,"_cnpm_publish_time":1424501480942,"_cnpmcore_publish_time":"2021-12-16T22:11:47.039Z"},"1.1.1":{"name":"typescript-loader","version":"1.1.1","description":"TypeScript Webpack Loader","main":"lib/index.js","directories":{"example":"example"},"dependencies":{"bluebird":"^2.7.1","loader-utils":"^0.2.6","object-assign":"^2.0.0","typescript":"^1.4.1"},"devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/andreypopp/typescript-loader"},"keywords":["webpack","loader","webpack-loader","typescript"],"author":{"name":"Andrey Popp","email":"me@andreypopp.com"},"license":"MIT","bugs":{"url":"https://github.com/andreypopp/typescript-loader/issues"},"homepage":"https://github.com/andreypopp/typescript-loader","gitHead":"c7e504da92bca87efce5adaaccaa72f972826b15","_id":"typescript-loader@1.1.1","_shasum":"90821f2d695ba82ca4080a81ac9f35ce56d07e77","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.10.33","_npmUser":{"name":"andreypopp","email":"8mayday@gmail.com"},"maintainers":[{"name":"andreypopp","email":"8mayday@gmail.com"},{"name":"jgoz","email":""}],"dist":{"shasum":"90821f2d695ba82ca4080a81ac9f35ce56d07e77","size":11225,"noattachment":false,"key":"/typescript-loader/-/typescript-loader-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/typescript-loader/download/typescript-loader-1.1.1.tgz"},"publish_time":1424103228926,"_hasShrinkwrap":false,"_cnpm_publish_time":1424103228926,"_cnpmcore_publish_time":"2021-12-16T22:11:47.338Z"},"1.1.0":{"name":"typescript-loader","version":"1.1.0","description":"TypeScript Webpack Loader","main":"lib/index.js","directories":{"example":"example"},"dependencies":{"bluebird":"^2.7.1","loader-utils":"^0.2.6","object-assign":"^2.0.0","typescript":"^1.4.1"},"devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/andreypopp/typescript-loader"},"keywords":["webpack","loader","webpack-loader","typescript"],"author":{"name":"Andrey Popp","email":"me@andreypopp.com"},"license":"MIT","bugs":{"url":"https://github.com/andreypopp/typescript-loader/issues"},"homepage":"https://github.com/andreypopp/typescript-loader","gitHead":"c7e4688dae975c36ab012b2e7583f213b9d22e01","_id":"typescript-loader@1.1.0","_shasum":"4e9c6e7a8db643c3db7a8ed2256a069123a0ae5e","_from":".","_npmVersion":"2.1.11","_nodeVersion":"0.10.33","_npmUser":{"name":"andreypopp","email":"8mayday@gmail.com"},"maintainers":[{"name":"andreypopp","email":"8mayday@gmail.com"},{"name":"jgoz","email":""}],"dist":{"shasum":"4e9c6e7a8db643c3db7a8ed2256a069123a0ae5e","size":11045,"noattachment":false,"key":"/typescript-loader/-/typescript-loader-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/typescript-loader/download/typescript-loader-1.1.0.tgz"},"publish_time":1423568899950,"_hasShrinkwrap":false,"_cnpm_publish_time":1423568899950,"_cnpmcore_publish_time":"2021-12-16T22:11:47.559Z"},"1.0.0":{"name":"typescript-loader","version":"1.0.0","description":"TypeScript Webpack Loader","main":"lib/index.js","directories":{"example":"example"},"dependencies":{"bluebird":"^2.7.1","loader-utils":"^0.2.6","object-assign":"^2.0.0","typescript":"^1.4.1"},"devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/andreypopp/typescript-loader"},"keywords":["webpack","loader","webpack-loader","typescript"],"author":{"name":"Andrey Popp","email":"me@andreypopp.com"},"license":"MIT","bugs":{"url":"https://github.com/andreypopp/typescript-loader/issues"},"homepage":"https://github.com/andreypopp/typescript-loader","gitHead":"1502b922c4cc44b0fd6e4d6872800faf37197de7","_id":"typescript-loader@1.0.0","_shasum":"35946a7ac30c584263e7a4dc64296a997075ecbc","_from":".","_npmVersion":"2.1.11","_nodeVersion":"0.10.33","_npmUser":{"name":"andreypopp","email":"8mayday@gmail.com"},"maintainers":[{"name":"andreypopp","email":"8mayday@gmail.com"},{"name":"jgoz","email":""}],"dist":{"shasum":"35946a7ac30c584263e7a4dc64296a997075ecbc","size":10804,"noattachment":false,"key":"/typescript-loader/-/typescript-loader-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/typescript-loader/download/typescript-loader-1.0.0.tgz"},"publish_time":1422167933057,"_hasShrinkwrap":false,"_cnpm_publish_time":1422167933057,"_cnpmcore_publish_time":"2021-12-16T22:11:48.161Z"},"0.1.2":{"name":"typescript-loader","version":"0.1.2","description":"Typescript loader for webpack","main":"dist/index.js","files":["dist"],"scripts":{"test":"gulp test","prepublish":"gulp build"},"repository":{"type":"git","url":"git://github.com/jgoz/typescript-loader.git"},"keywords":["typescript","typescript-loader","webpack","webpack-loader"],"author":{"name":"John Gozde","email":"john@gozde.ca"},"license":"MIT","bugs":{"url":"https://github.com/jgoz/typescript-loader/issues"},"homepage":"https://github.com/jgoz/typescript-loader","dependencies":{"bluebird":"^1.2","loader-utils":"^0","temp":"^0","through2":"^0","typescript":"^1.0"},"devDependencies":{"glob":"^3","gulp":"^3","gulp-mocha":"*","gulp-util":"^2","mocha":"^1","rimraf":"^2.2.8"},"gitHead":"0debf9af1b4e22ac3df5b4326f980dedf70eb105","_id":"typescript-loader@0.1.2","_shasum":"e1f51737dc9b6707be294af5d5761c8237147e18","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"jgoz","email":"john@gozde.ca"},"maintainers":[{"name":"andreypopp","email":"8mayday@gmail.com"},{"name":"jgoz","email":""}],"dist":{"shasum":"e1f51737dc9b6707be294af5d5761c8237147e18","size":5672,"noattachment":false,"key":"/typescript-loader/-/typescript-loader-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/typescript-loader/download/typescript-loader-0.1.2.tgz"},"directories":{},"publish_time":1405704133221,"_hasShrinkwrap":false,"_cnpm_publish_time":1405704133221,"_cnpmcore_publish_time":"2021-12-16T22:11:48.356Z"},"0.1.1":{"name":"typescript-loader","version":"0.1.1","description":"Typescript loader for webpack","main":"dist/index.js","files":["dist"],"scripts":{"test":"gulp test","prepublish":"gulp build"},"repository":{"type":"git","url":"git://github.com/jgoz/typescript-loader.git"},"keywords":["typescript","typescript-loader","webpack","webpack-loader"],"author":{"name":"John Gozde","email":"john@gozde.ca"},"license":"MIT","bugs":{"url":"https://github.com/jgoz/typescript-loader/issues"},"homepage":"https://github.com/jgoz/typescript-loader","dependencies":{"bluebird":"^1.2","loader-utils":"^0","temp":"^0","typescript":"^1.0","through2":"^0"},"devDependencies":{"glob":"^3","gulp":"^3","gulp-mocha":"*","gulp-util":"^2","mocha":"^1","rimraf":"^2.2.8"},"gitHead":"8a79200fecf40439d1569a2bb34c95e1d97167dc","_id":"typescript-loader@0.1.1","_shasum":"c07d02072e3efc9239fe42b1b8cb58c57875e07f","_from":".","_npmVersion":"1.4.13","_npmUser":{"name":"jgoz","email":"john@gozde.ca"},"maintainers":[{"name":"andreypopp","email":"8mayday@gmail.com"},{"name":"jgoz","email":""}],"dist":{"shasum":"c07d02072e3efc9239fe42b1b8cb58c57875e07f","size":3714,"noattachment":false,"key":"/typescript-loader/-/typescript-loader-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/typescript-loader/download/typescript-loader-0.1.1.tgz"},"directories":{},"publish_time":1402120951092,"_hasShrinkwrap":false,"_cnpm_publish_time":1402120951092,"_cnpmcore_publish_time":"2021-12-16T22:11:48.597Z"},"0.1.0":{"name":"typescript-loader","version":"0.1.0","description":"Typescript loader for webpack","main":"dist/index.js","files":["dist"],"scripts":{"test":"gulp test","prepublish":"gulp build"},"repository":{"type":"git","url":"git://github.com/jgoz/typescript-loader.git"},"keywords":["typescript","typescript-loader","webpack","webpack-loader"],"author":{"name":"John Gozde","email":"john@gozde.ca"},"license":"MIT","bugs":{"url":"https://github.com/jgoz/typescript-loader/issues"},"homepage":"https://github.com/jgoz/typescript-loader","dependencies":{"bluebird":"^1.2","loader-utils":"^0","through2":"^0","ts-compiler":"^2","typescript":"^1.0"},"devDependencies":{"glob":"^3","gulp":"^3","gulp-jshint":"^1","gulp-mocha":"*","gulp-util":"^2","jshint":"^2","jshint-stylish":"*","mocha":"^1"},"_id":"typescript-loader@0.1.0","_shasum":"f5363cdeef71936584bf1505c85e353e9466b581","_from":".","_npmVersion":"1.4.7","_npmUser":{"name":"jgoz","email":"john@gozde.ca"},"maintainers":[{"name":"andreypopp","email":"8mayday@gmail.com"},{"name":"jgoz","email":""}],"dist":{"shasum":"f5363cdeef71936584bf1505c85e353e9466b581","size":5443,"noattachment":false,"key":"/typescript-loader/-/typescript-loader-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/typescript-loader/download/typescript-loader-0.1.0.tgz"},"directories":{},"publish_time":1402088921801,"_hasShrinkwrap":false,"_cnpm_publish_time":1402088921801,"_cnpmcore_publish_time":"2021-12-16T22:11:48.770Z"},"0.0.0":{"name":"typescript-loader","version":"0.0.0","description":"Very very basic loader for typescript in webpack","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"ISC","dependencies":{"typestring":"^1.0.0","typescript-api":"^1.0.0"},"_id":"typescript-loader@0.0.0","dist":{"shasum":"8def3c6ed82a9ba85ba7967287ec0d2720c0eab5","size":3353,"noattachment":false,"key":"/typescript-loader/-/typescript-loader-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/typescript-loader/download/typescript-loader-0.0.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"floydophone","email":"floydophone@gmail.com"},"maintainers":[{"name":"andreypopp","email":"8mayday@gmail.com"},{"name":"jgoz","email":""}],"directories":{},"publish_time":1397200507793,"_hasShrinkwrap":false,"_cnpm_publish_time":1397200507793,"_cnpmcore_publish_time":"2021-12-16T22:11:48.993Z"}},"readme":"# TypeScript Webpack Loader\n\nTypeScript loader for Webpack.\n\n## Example Configuration\n\n**webpack.config.js**\n\n```javascript\nmodule.exports = {\n\n  // Currently we need to add '.ts' to resolve.extensions array.\n  resolve: {\n    extensions: ['', '.webpack.js', '.web.js', '.ts', '.js']\n  },\n\n  // Source maps support (or 'inline-source-map' also works)\n  devtool: 'source-map',\n\n  // Add loader for .ts files.\n  module: {\n    loaders: [\n      {\n        test: /\\.ts$/,\n        loader: 'typescript-loader'\n      }\n    ]\n  }\n};\n```\n\nAfter that, you would be able to write JSX in TypeScript!\n\n## Best Practices\n\n### Using with JSX-TypeScript compiler\n\nYou can use `typescript-loader` together with\n[jsx-typscript](https://github.com/fdecampredon/jsx-typescript) compiler which\nhas support for JSX syntax (used in React.js).\n\nFor that you need to install `jsx-typescript`:\n\n    % npm install jsx-typescript\n\nAnd specify `typescriptCompiler` loader option:\n\n```javascript\nmodule.exports = {\n\n  module: {\n    loaders: [\n      {\n        test: /\\.ts$/,\n        loader: 'typescript-loader?typescriptCompiler=jsx-typescript'\n      }\n    ]\n  }\n};\n```\n\n### External Modules\n\nThe most natural way to structure your code with TypeScript and webpack is to use [external modules](https://github.com/Microsoft/TypeScript/wiki/Modules#going-external), and these work as you would expect. \n\n```\nnpm install --save react\n```\n\n```typescript\nimport React = require('react');\n```\n\n### Internal Modules\n\nTypeScript Loader will work with [internal modules](https://github.com/Microsoft/TypeScript/wiki/Modules#multi-file-internal-modules) too, however acquiring a reference to modules declared this way requires some work using the `exports-loader`. This is required because webpack wraps every file in a closure and internal modules are meant to run in a global context.\n\n**foo.ts**\n```typescript\nmodule Foo {\n  export var bar = 42;\n}\n```\n\n**main.ts**\n```typescript\n/// <reference path=\"foo.ts\" />\nvar foo: typeof Foo = require('exports?Foo!./foo');\nconsole.log(foo.bar) // 42\n```\n","_attachments":{},"homepage":"https://github.com/andreypopp/typescript-loader","bugs":{"url":"https://github.com/andreypopp/typescript-loader/issues"},"license":"MIT"}