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 摘要。