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

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

Đang mở
#91 7 bình luận 11 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
370
Fork
144
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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?

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.