Skip to content

Commit

Permalink
Update webpack.config.js
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyreilly authored Jul 21, 2017
1 parent 1bbe740 commit 1c1056f
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions examples/thread-loader/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,25 @@ module.exports = {
entry: './src/index.ts',
output: { filename: 'dist/index.js' },
module: {
rules: [
{ loader: 'cache-loader' },
{
loader: 'thread-loader',
options: {
// there should be 1 cpu for the fork-ts-checker-webpack-plugin
workers: require('os').cpus().length - 1,
rules: {
test: /\.tsx?$/,
use: [
{ loader: 'cache-loader' },
{
loader: 'thread-loader',
options: {
// there should be 1 cpu for the fork-ts-checker-webpack-plugin
workers: require('os').cpus().length - 1,
},
},
},
{
test: /\.tsx?$/,
loader: 'ts-loader',
options: {
happyPackMode: true // IMPORTANT! use happyPackMode mode to speed-up compilation and reduce errors reported to webpack
{
loader: 'ts-loader',
options: {
happyPackMode: true // IMPORTANT! use happyPackMode mode to speed-up compilation and reduce errors reported to webpack
}
}
}
]
]
}
},
resolve: {
extensions: ['.ts', '.tsx', 'js']
Expand Down

0 comments on commit 1c1056f

Please sign in to comment.