Don’t use BundleAnalyzerPlugin in tests
parent
4f9320a51f
commit
6d60239998
|
@ -62,7 +62,7 @@ module.exports = function(config) {
|
|||
|
||||
// Continuous Integration mode
|
||||
// if true, Karma captures browsers, runs the tests and exits
|
||||
singleRun: false,
|
||||
singleRun: true,
|
||||
|
||||
// Concurrency level
|
||||
// how many browser should be started simultaneous
|
||||
|
|
|
@ -6,7 +6,7 @@ var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlug
|
|||
var PROD = process.env.NODE_ENV === 'production';
|
||||
var TEST = process.env.NODE_ENV === 'test';
|
||||
|
||||
module.exports = {
|
||||
var config = {
|
||||
entry: path.resolve('src/index.js'),
|
||||
output: {
|
||||
path: path.resolve('dist'),
|
||||
|
@ -15,14 +15,7 @@ module.exports = {
|
|||
libraryTarget: 'umd',
|
||||
},
|
||||
|
||||
externals: !TEST && [{
|
||||
'react': {
|
||||
root: 'React',
|
||||
commonjs2: 'react',
|
||||
commonjs: 'react',
|
||||
amd: 'react',
|
||||
},
|
||||
}],
|
||||
externals: [],
|
||||
|
||||
module: {
|
||||
loaders: [
|
||||
|
@ -53,8 +46,26 @@ module.exports = {
|
|||
new webpack.DefinePlugin({
|
||||
EMOJI_DATASOURCE_VERSION: `'${pack.devDependencies['emoji-datasource']}'`,
|
||||
}),
|
||||
new BundleAnalyzerPlugin({ analyzerMode: 'static', openAnalyzer: false })
|
||||
],
|
||||
|
||||
bail: true,
|
||||
}
|
||||
|
||||
if (!TEST) {
|
||||
config.externals = config.externals.concat([
|
||||
{
|
||||
'react': {
|
||||
root: 'React',
|
||||
commonjs2: 'react',
|
||||
commonjs: 'react',
|
||||
amd: 'react',
|
||||
},
|
||||
},
|
||||
])
|
||||
|
||||
config.plugins = config.plugins.concat([
|
||||
new BundleAnalyzerPlugin({ analyzerMode: 'static', openAnalyzer: false }),
|
||||
])
|
||||
}
|
||||
|
||||
module.exports = config
|
||||
|
|
Loading…
Reference in New Issue