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 ForkCheckerPlugin = require('awesome-typescript-loader').ForkCheckerPlugin;
const root = require('./helpers').root;
const VERSION = JSON.stringify(require('../package.json').version);
module.exports = {
//context: root(),
devtool: 'inline-source-map',
resolve: {
extensions: ['', '.ts', '.js', '.json', '.css', '.scss', '.html'],
@ -90,14 +89,18 @@ module.exports = {
]
},
plugins: [
new webpack.DefinePlugin({
'IS_PRODUCTION': false,
'LIB_VERSION': VERSION
}),
new ForkCheckerPlugin()
// ignore changes during tests
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,
webpackMiddleware: {
stats: {
modules: false,
cached: false,
chunk: false
},
noInfo: true
stats: 'errors-only',
state: true
},
client: {
chai: {