Ignore changes (watcher) during tests

This commit is contained in:
Roman Hotsiy 2016-08-29 12:05:44 +03:00
parent e6efe35595
commit d297ac475d
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0
2 changed files with 11 additions and 12 deletions

View File

@ -1,12 +1,11 @@
const webpack = require('webpack'); const webpack = require('webpack');
const ForkCheckerPlugin = require('awesome-typescript-loader').ForkCheckerPlugin;
const root = require('./helpers').root; const root = require('./helpers').root;
const VERSION = JSON.stringify(require('../package.json').version); const VERSION = JSON.stringify(require('../package.json').version);
module.exports = { module.exports = {
//context: root(),
devtool: 'inline-source-map', devtool: 'inline-source-map',
resolve: { resolve: {
extensions: ['', '.ts', '.js', '.json', '.css', '.scss', '.html'], extensions: ['', '.ts', '.js', '.json', '.css', '.scss', '.html'],
@ -90,14 +89,18 @@ module.exports = {
] ]
}, },
plugins: [ plugins: [
new webpack.DefinePlugin({ new webpack.DefinePlugin({
'IS_PRODUCTION': false, 'IS_PRODUCTION': false,
'LIB_VERSION': VERSION 'LIB_VERSION': VERSION
}), }),
// ignore changes during tests
new ForkCheckerPlugin() new webpack.WatchIgnorePlugin([
/\/ReDoc$/i, // ignore change of ReDoc folder itself
/node_modules\/(?:[^\/]*(?:\/|$))*[^\/]*$/,
/\.tmp\/(?:[^\/]*(?:\/|$))*[^\/]*$/,
/dist\/(?:[^\/]*(?:\/|$))*[^\/]*$/,
/(?:[^\/]*(?:\/|$))*[^\/]*\.css$/ // ignore css files
])
], ],
} }

View File

@ -19,12 +19,8 @@ module.exports = function (config) {
}, },
webpack: testWebpackConfig, webpack: testWebpackConfig,
webpackMiddleware: { webpackMiddleware: {
stats: { stats: 'errors-only',
modules: false, state: true
cached: false,
chunk: false
},
noInfo: true
}, },
client: { client: {
chai: { chai: {