Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ language: node_js
sudo: false

os:
- linux
- osx

node_js:
- 'node'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"compilerOptions": {
"sourceMap": true,
"skipLibCheck": true,
"suppressOutputPathCheck": true
"skipLibCheck": true
}
}
7 changes: 7 additions & 0 deletions packages/scss-config-webpack-plugin/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"declaration": true,
"rootDir": "./"
}
}
15 changes: 9 additions & 6 deletions packages/ts-config-webpack-plugin/config/development.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');

const cpus = os.cpus().length;

// we use <max> - 2 workers for quadcore cpus and higher, two cpus are reserved
// for the ts checker plugin (which at least needs one).
const tsLoaderWorkers = cpus > 3 ? cpus - 2 : 1;
const forkTsCheckerWorkers = Math.max(1, cpus - tsLoaderWorkers);
// we use <max> - 1 workers for tricore cpus and higher, one cpu will be preserved
const tsLoaderWorkers = cpus > 2 ? cpus - 1 : 1;

/**
* Common Development Config
Expand Down Expand Up @@ -65,12 +63,17 @@ exports = module.exports = (options) => ({
new ForkTsCheckerWebpackPlugin({
// don't block webpack's emit to wait for type checker, errors only visible inside CLI
async: true,
// increase performance on multicore systems
workers: forkTsCheckerWorkers,
// checkSyntacticErrors is required as we use happyPackMode and the thread-loader to parallelise the builds
checkSyntacticErrors: true,
// Set the tsconfig.json path
tsconfig: options.configFile,
// Make use of a new API comming with TypeScript 2.7
// which allows to speed up the type checking
// https://github.com/namics/webpack-config-plugins/issues/39
useTypescriptIncrementalApi: true,
// To allow using this plugin even if there is no .ts or .tsx file
// ignore "TS18003: No inputs were found in config file"
ignoreDiagnostics: [18003],
}),
],
});
3 changes: 3 additions & 0 deletions packages/ts-config-webpack-plugin/config/production.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ exports = module.exports = (options) => ({
checkSyntacticErrors: true,
// Set the tsconfig.json path
tsconfig: options.configFile,
// To allow using this plugin even if there is no .ts or .tsx file
// ignore "TS18003: No inputs were found in config file"
ignoreDiagnostics: [18003],
}),
],
});
2 changes: 1 addition & 1 deletion packages/ts-config-webpack-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
},
"dependencies": {
"cache-loader": "^1.2.2",
"fork-ts-checker-webpack-plugin": "^0.5.2",
"fork-ts-checker-webpack-plugin": "1.0.0-alpha.4",
"thread-loader": "^2.1.1",
"ts-loader": "^5.3.1",
"tslint": "^5.12.0"
Expand Down
7 changes: 6 additions & 1 deletion performance/measure-dev-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ async function launchWebpackDevServer(args, environmentName, onReady) {
process.hrtime(startTime)[0] + Math.round(process.hrtime(startTime)[1] / 1000000) / 1000;
timings.push(elapsed);
}
if (runs === 0) {
// Wait for the initial build to be done
// including garbage collection
await sleep(10000);
}
// Wait for a moment to prevent running into thresholds
await sleep(3500);
runs++;
Expand All @@ -92,7 +97,7 @@ async function launchWebpackDevServer(args, environmentName, onReady) {
await rimrafAsync('./profiles');

// Configs as in webpack.config.NAME.js
const environments = ['current', 'latest'];
const environments = ['latest', 'current'];
const results = {};
let generatedComponentCount;

Expand Down