Skip to content

Commit 6ab290d

Browse files
committed
Pipe filesToIgnore through to the typings generator.
1 parent 6be84b6 commit 6ab290d

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

webpack/localization-plugin/src/LocalizationPlugin.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ export class LocalizationPlugin implements Webpack.Plugin {
114114
typingsPreprocessor = new TypingsGenerator({
115115
srcFolder: this._options.typingsOptions.sourceRoot || compiler.context,
116116
generatedTsFolder: this._options.typingsOptions.generatedTsFolder,
117-
exportAsDefault: this._options.exportAsDefault
117+
exportAsDefault: this._options.exportAsDefault,
118+
filesToIgnore: this._options.filesToIgnore
118119
});
119120
} else {
120121
typingsPreprocessor = undefined;

webpack/localization-plugin/src/TypingsGenerator.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ export class TypingsGenerator {
3838

3939
public constructor(options: ITypingsGeneratorOptions) {
4040
this._options = {
41-
filesToIgnore: [],
4241
...options
4342
};
4443

@@ -58,6 +57,10 @@ export class TypingsGenerator {
5857
throw new Error('generatedTsFolder must not be under srcFolder');
5958
}
6059

60+
if (!this._options.filesToIgnore) {
61+
this._options.filesToIgnore = [];
62+
}
63+
6164
if (!this._options.terminal) {
6265
this._options.terminal = new Terminal(new ConsoleTerminalProvider({ verboseEnabled: true }));
6366
}

0 commit comments

Comments
 (0)