Module build failed: BrowserslistError: Unknown browser query `op_mini all`
See original GitHub issueHello Guys, I am receiving this error during webpack command for production build: “rimraf dist/* && webpack -p --bail --config ./etc/webpack.config.prod.js”
var path = require('path');
var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
entry: {
styles: ['./Client/styles.js'],
jquery: ['./Client/jquery.js'],
vendor: ['./Client/vendor.js'],
app: [
'./CommonResources/Common/sharedModule.js',
'./Client/app.ts'
]
},
output: {
path: path.resolve(__dirname + '/../dist'),
filename: '[name].bundle.js',
publicPath: '/dist/'
},
resolve: {
alias: {
cdn: path.resolve(__dirname + '/../CommonResources')
}
},
plugins: [
new ExtractTextPlugin({
filename: '[name].bundle.css',
allChunks: true
})
],
module: {
loaders: [
{
test: /\.tsx?$/,
loaders: ['awesome-typescript-loader'],
exclude: /node_modules/
},
{
test: /\.js$/,
exclude: /node_modules|modernizr.custom.js|kendo.all.min.js|ipreo.common.docViewer.min.js|jszip.min.js|pdf.js|pdf.worker.js/,
loader: 'babel-loader',
query: {
presets: ['es2015']
}
},
{
test: /\.html$/,
loader: 'html-loader'
},
{
test: /\.less$/,
loader: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: ['css-loader?importLoaders=1', 'postcss-loader', 'less-loader']
})
},
{
test: /\.css$/,
loader: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: ['css-loader?importLoaders=1!', 'postcss-loader']
})
}
]
}
};
ERROR in .//css-loader?importLoaders=1!.//postcss-loader!./~/less-loader!./Client/myComponent.less Module build failed: BrowserslistError: Unknown browser query op_mini all at error (C:\Web\node_modules\browserslist\index.js:23:15) at C:\Web\node_modules\browserslist\index.js:123:13 at Array.forEach (native) at browserslist (C:\Web\node_modules\browserslist\index.js:95:16) at isSupported (C:\Web\node_modules\caniuse-api\dist\index.js:66:37) at C:\Web\node_modules\postcss-merge-rules\dist\lib\ensureCompatibility.js:95:66 at C:\Web\node_modules\postcss-selector-parser\dist\selectors\container.js:170:26 at Selector.each (C:\Web\node_modules\postcss-selector-parser\dist\selectors\container.js:153:22) at Selector.walk (C:\Web\node_modules\postcss-selector-parser\dist\selectors\container.js:169:21) at C:\Web\node_modules\postcss-selector-parser\dist\selectors\container.js:173:31 at Root.each (C:\Web\node_modules\postcss-selector-parser\dist\selectors\container.js:153:22) at Root.walk (C:\Web\node_modules\postcss-selector-parser\dist\selectors\container.js:169:21) at Processor.func (C:\Web\node_modules\postcss-merge-rules\dist\lib\ensureCompatibility.js:88:17) at Processor.process (C:\Web\node_modules\postcss-selector-parser\dist\processor.js:34:14) at C:\Web\node_modules\postcss-merge-rules\dist\lib\ensureCompatibility.js:134:12 at Array.every (native) at ensureCompatibility (C:\Web\node_modules\postcss-merge-rules\dist\lib\ensureCompatibility.js:79:22) at canMerge (C:\Web\node_modules\postcss-merge-rules\dist\index.js:72:44) at C:\Web\node_modules\postcss-merge-rules\dist\index.js:220:24 at C:\Web\node_modules\postcss\lib\container.es6:199:28 at C:\Web\node_modules\postcss\lib\container.es6:110:26 at Root.each (C:\Web\node_modules\postcss\lib\container.es6:78:22) at Root.walk (C:\Web\node_modules\postcss\lib\container.es6:109:21) at Root.walkRules (C:\Web\node_modules\postcss\lib\container.es6:197:25) at C:\Web\node_modules\postcss-merge-rules\dist\index.js:267:13 at LazyResult.run (C:\Web\node_modules\postcss\lib\lazy-result.es6:321:20) at LazyResult.asyncTick (C:\Web\node_modules\postcss\lib\lazy-result.es6:248:32) at LazyResult.asyncTick (C:\Web\node_modules\postcss\lib\lazy-result.es6:260:22) at LazyResult.asyncTick (C:\Web\node_modules\postcss\lib\lazy-result.es6:260:22) at LazyResult.asyncTick (C:\Web\node_modules\postcss\lib\lazy-result.es6:260:22)
and it works fine when running webpack without “-p” key
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
Also I highly recommend to move browsers lost to
browserslist
key inpackage.json
. In Autoprefixer twitter I show many cases, whenbrowsers
option will not work.You are right it was old “babel-plugin-react-autoprefix” dependency. Now I am good. Thank you a lot!