ionic-team / ionic-team/ionic-unit-testing-example

ts-loader's default config makes Webpack extremely slow in larger projects

未關閉
#91 7 則留言 11 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
TypeScript
星號
370
分支
144
PR 合併指標
30 天內沒有已合併 PR

描述

The nature of ts-loader makes it slower as the project's size increases.
https://github.com/TypeStrong/ts-loader#faster-builds

There are 2 options to make it fast:

- Use a separate process for typechecking, following `ts-loader`'s docs in the link above:
```
var ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
[ ... ]
module: {
rules: [{
test: /\.ts$/,
loaders: [{
loader: 'ts-loader',
options: {
transpileOnly: true
}
}, 'angular2-template-loader']
},
[ ... ].
plugins: [
new ForkTsCheckerWebpackPlugin(),
[ ... ]
```

- Use `awesome-typescript-loader`:
```
[ ... ]
module: {
rules: [{
test: /\.ts$/,
loaders: ['awesome-typescript-loader', 'angular2-template-loader']
},
[ ... ]
```

Any inputs on if these changes breaks anything?

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。