Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ts-loader

Package Overview
Dependencies
Maintainers
1
Versions
165
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-loader - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

4

CHANGELOG.md
# Changelog
## v0.3.1
- Add support for specifying a custom TypeScript compiler
## v0.3.0

@@ -4,0 +8,0 @@

7

index.js

@@ -17,2 +17,3 @@ ///<reference path="node_modules/typescript/bin/typescript.d.ts" />

function ensureTypeScriptInstance(options) {
var compiler = require(options.compiler);
if (Object.prototype.hasOwnProperty.call(instances, options.instance))

@@ -63,4 +64,5 @@ return instances[options.instance];

};
var languageService = typescript.createLanguageService(servicesHost, typescript.createDocumentRegistry());
var languageService = compiler.createLanguageService(servicesHost, compiler.createDocumentRegistry());
return instances[options.instance] = {
compiler: compiler,
compilerOptions: compilerOptions,

@@ -79,2 +81,3 @@ files: files,

instance: 'default',
compiler: 'typescript',
sourceMap: false

@@ -86,3 +89,3 @@ }, options);

filePaths.push(filePath);
var program = typescript.createProgram(filePaths, instance.compilerOptions, typescript.createCompilerHost(instance.compilerOptions));
var program = instance.compiler.createProgram(filePaths, instance.compilerOptions, instance.compiler.createCompilerHost(instance.compilerOptions));
program.getSourceFiles().forEach(function (file) {

@@ -89,0 +92,0 @@ var filePath = path.normalize(file.filename);

{
"name": "ts-loader",
"version": "0.3.0",
"version": "0.3.1",
"description": "TypeScript loader for webpack",

@@ -36,2 +36,3 @@ "main": "index.js",

"devDependencies": {
"jsx-typescript": "^1.5.0-alpha.4",
"mocha": "^2.1.0",

@@ -38,0 +39,0 @@ "webpack": "^1.5.3"

@@ -54,2 +54,7 @@ # TypeScript loader for webpack

##### compiler *(string) (default='typescript')*
Allows use of TypeScript compilers other than the official one. Should be
set to the NPM name of the compiler.
##### instance *(string)*

@@ -105,4 +110,8 @@

Please see [ts-jsx-loader](https://github.com/jbrantly/ts-jsx-loader)
This loader supports using [jsx-typescript](https://github.com/fdecampredon/jsx-typescript).
Simply install jsx-typescript and use the `compiler=jsx-typescript` option.
If for some reason using `jsx-typescript` doesn't work or you want to use the official
TypeScript take a look at [ts-jsx-loader](https://github.com/jbrantly/ts-jsx-loader).
## Building from source

@@ -109,0 +118,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc