プロジェクトで TSLint を実行しようとしていますが、現在 webpack でビルドしようとすると失敗します。次の構造を持つプロジェクトの簡単な再現を作成しました。
\tslint-issue
|-\src
| |-Base.ts
| |-Derived.ts
| |-index.tsx
|-babel.rc
|-index.html
|-package.json
|-tsconfig.json
|-webpack.config.json
Base と Derived は非常に単純なクラス定義です。しかし、私が走るとき
webpack
次のメッセージが表示されます。
ERROR in ./src/Derived.ts
Module build failed: TypeError: this.computeFullOptions is not a function
at Object.Linter (c:\Code\tslint-issue\node_modules\tslint\lib\tslint.js:15:29)
@ ./src/index.tsx 2:16-36
webpack.config.jsonから次のセクションを削除すると
{
test: /\.ts$/,
loader: 'tslint'
},
それは正常に動作します。さらに情報が必要な場合は、必要なプロジェクトの一部を提供できます。index.tsx ファイルのDerived
クラスをインポートするDerived.ts
と、次の内容が含まれます。
import { Derived } from "./Derived";
var d = new Derived(25);
console.log(d.AbsMethod());
前もって感謝します!