image-webpack-loader
image-webpack-loader copied to clipboard
EventEmitter memory leak
Upon using even the most basic 'image-webpack?bypassOnDebug&optimizationLevel=7&interlaced=false'
I get the following errors:
(node) warning: possible EventEmitter memory leak detected. 11 exit listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
at EventEmitter.addListener (events.js:239:17)
at module.exports (H:\Dev\node_modules\signal-exit\index.js:41:11)
at module.exports.promise (H:\Dev\node_modules\execa\index.js:146:23)
at H:\Dev\node_modules\exec-buffer\index.js:35:15
As soon as I remove the loader, everything is fine.
My webpack:
var webpack = require('webpack'),
HtmlWebpackPlugin = require('html-webpack-plugin'),
ExtractTextPlugin = require('extract-text-webpack-plugin'),
helpers = require('./helpers');
module.exports = {
entry: {
'polyfills': './src/polyfills.ts',
'vendor': './src/vendor.ts',
'app': './src/main.ts'
},
resolve: {
extensions: ['', '.js', '.ts']
},
module: {
loaders: [
{
test: /\.ts$/,
loaders: [
'awesome-typescript-loader',
'angular2-template-loader'
]
},
{
test: /\.html$/,
loader: 'html'
},
{
test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)$/,
loaders: [
'file?name=assets/[name].[hash].[ext]',
'image-webpack?bypassOnDebug&optimizationLevel=7&interlaced=false'
]
},
{
test: /\.css$/,
exclude: helpers.root('src', 'app'),
loader: ExtractTextPlugin.extract('style', 'css?sourceMap')
},
{
test: /\.css$/,
include: helpers.root('src', 'app'),
loader: 'raw'
}
]
},
plugins: [
new webpack.optimize.CommonsChunkPlugin({
name: ['app', 'vendor', 'polyfills']
}),
new HtmlWebpackPlugin({
template: 'src/index.html'
}),
new webpack.ProvidePlugin({
jQuery: 'jquery',
$: 'jquery',
jquery: 'jquery'
})
],
};
I have a same problem.@Lammmas Here 's My webpack:
config.loader('images', {
test: /\.(jpe?g|png|gif|svg)(\?.*)?$/i,
loaders: [
'url-loader?limit=10000&&name=images/[name]-[hash].[ext]',
'image-webpack-loader?{progressive:true, optimizationLevel: 7, interlaced: false, mozjpeg:{quality:85}, pngquant:{quality: "65-90", speed: 4}}', // eslint-disable-line
],
})
I have a same problem. when many background-image: url('./*.png') in *.less or *.css
How to solve this?
For me the problem is in exec-buffer
and yarn why
says that
This module exists because "image-webpack-loader#imagemin-gifsicle" depends on it
okay, here is a root cause https://github.com/sindresorhus/execa/issues/61
I have the same issue. Is there any workaround?
+1