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

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

Aperta
#91 7 commenti 11 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
370
Fork
144
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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?

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.