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

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

Open
#91 7 comments 11 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
370
Forks
144
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.