UNPKG

741 BJavaScriptView Raw
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6
7class IgnoreTypeScriptExportWarnings {
8 apply(compiler) {
9 compiler.hooks.done.intercept({
10 call: stats => {
11 const thisCompilation = stats.compilation;
12 thisCompilation.warnings = thisCompilation.warnings.filter(warning => warning.name === 'ModuleDependencyWarning').filter(warning => Boolean(warning.module.resource)).filter(warning => warning.module.resource.match(/\.tsx?$/)).filter(warning => !warning.message.match(/export .+ was not found/));
13 },
14 loop: _ => {},
15 tap: _ => {},
16 register: tap => tap,
17 context: false
18 });
19 }
20
21}
22
23exports.IgnoreTypeScriptExportWarnings = IgnoreTypeScriptExportWarnings;
\No newline at end of file