ts-loader
Advanced tools
Comparing version 9.2.4 to 9.2.5
# Changelog | ||
## v9.2.5 | ||
* [Add function to get the latest program](https://github.com/TypeStrong/ts-loader/pull/1352) - thanks @Zn4rK | ||
## v9.2.4 | ||
@@ -4,0 +8,0 @@ |
@@ -246,3 +246,4 @@ "use strict"; | ||
: instance.compiler.createProgram([], instance.compilerOptions)); | ||
instance.transformers = getCustomTransformers(program); | ||
const getProgram = () => program; | ||
instance.transformers = getCustomTransformers(program, getProgram); | ||
// Setup watch run for solution building | ||
@@ -266,4 +267,5 @@ if (instance.solutionBuilderHost) { | ||
instance.watchOfFilesAndCompilerOptions.getProgram(); | ||
instance.program = instance.builderProgram.getProgram(); | ||
instance.transformers = getCustomTransformers(instance.program); | ||
const getProgram = () => { var _a; return (_a = instance.builderProgram) === null || _a === void 0 ? void 0 : _a.getProgram(); }; | ||
instance.program = getProgram(); | ||
instance.transformers = getCustomTransformers(instance.program, getProgram); | ||
} | ||
@@ -273,3 +275,4 @@ else { | ||
instance.languageService = instance.compiler.createLanguageService(instance.servicesHost, instance.compiler.createDocumentRegistry()); | ||
instance.transformers = getCustomTransformers(instance.languageService.getProgram()); | ||
const getProgram = () => instance.languageService.getProgram(); | ||
instance.transformers = getCustomTransformers(getProgram(), getProgram); | ||
} | ||
@@ -276,0 +279,0 @@ addAssetHooks(loader, instance); |
@@ -193,3 +193,3 @@ import type * as typescript from 'typescript'; | ||
happyPackMode: boolean; | ||
getCustomTransformers: string | ((program: typescript.Program) => typescript.CustomTransformers | undefined); | ||
getCustomTransformers: string | ((program: typescript.Program, getProgram: () => typescript.Program) => typescript.CustomTransformers | undefined); | ||
experimentalWatchApi: boolean; | ||
@@ -196,0 +196,0 @@ allowTsInNodeModules: boolean; |
{ | ||
"name": "ts-loader", | ||
"version": "9.2.4", | ||
"version": "9.2.5", | ||
"description": "TypeScript loader for webpack", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -336,3 +336,3 @@ # TypeScript loader for webpack | ||
|------| | ||
| ` (program: Program) => { before?: TransformerFactory<SourceFile>[]; after?: TransformerFactory<SourceFile>[]; afterDeclarations?: TransformerFactory<SourceFile>[]; } ` | | ||
| ` (program: Program, getProgram: () => Program) => { before?: TransformerFactory<SourceFile>[]; after?: TransformerFactory<SourceFile>[]; afterDeclarations?: TransformerFactory<SourceFile>[]; } ` | | ||
@@ -339,0 +339,0 @@ Provide custom transformers - only compatible with TypeScript 2.3+ (and 2.4 if using `transpileOnly` mode). For example usage take a look at [typescript-plugin-styled-components](https://github.com/Igorbek/typescript-plugin-styled-components) or our [test](test/comparison-tests/customTransformer). |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
247258
3028