TypeStrong / TypeStrong/ts-loader
ES2015 module issue with transpileOnly + decorators + interfaces
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 3.5k
- フォーク
- 439
- 平均マージ
- 17時間 17分
- マージ済み PR(30日)
- 2
説明
Hi there,
We have a very large Angular 2 codebase that we're attempting to move over to ts-loader; we're getting massive (4-5x) speed boosts compared to our existing awesome-typescript-loader setup, but sadly we're getting compilation issues when we turn on transpileOnly.
It only occurs when:
- Building ES2015 modules AND
- Using a class with a decorator on it AND
- The class uses an imported interface AND
- The imported interface comes from a module that also exports something concrete (e.g. a class or a const)
(webpack complains that it can't find the interface with a stack trace suggesting that it's processing harmony imports.)
I've created a repo with a standalone repro case in it: it's just tiny 2 files both of which are under 10 lines of code:
https://github.com/RoystonS/ts-loader-issue
(Is this related to what's discussed in issue #400?)
Thanks,
Royston.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
github.com/RoystonS/ts-loader-issue にあるスタンドアロンの2ファイル再現から始め、transpileOnly を有効にしてその webpack ビルドを実行します。ES2015 モジュール、デコレートされたクラス、および具体的な値もエクスポートするモジュールからインポートしたインターフェースを使って失敗を再現します。この組み合わせが missing-interface エラーや harmony-import エラーなしでコンパイルできれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- typescript, webpack
- 領域
- build-system, tooling
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100