Merge pull request #1798 from oxyc/patch-1
Allow browser versions to be configured in config.json
This commit is contained in:
@@ -26,6 +26,7 @@ const config = mergeWithConcat({
|
||||
watcher: !!argv.watch,
|
||||
},
|
||||
watch: [],
|
||||
browsers: [],
|
||||
}, userConfig);
|
||||
|
||||
config.watch.push(`${path.basename(config.paths.assets)}/${config.copy}`);
|
||||
|
||||
@@ -155,7 +155,7 @@ let webpackConfig = {
|
||||
output: { path: config.paths.dist },
|
||||
context: config.paths.assets,
|
||||
postcss: [
|
||||
autoprefixer({ browsers: ['last 2 versions', 'android 4', 'opera 12'] }),
|
||||
autoprefixer({ browsers: config.browsers }),
|
||||
],
|
||||
},
|
||||
}),
|
||||
|
||||
@@ -11,7 +11,10 @@ module.exports = {
|
||||
plugins: [
|
||||
new OptimizeCssAssetsPlugin({
|
||||
cssProcessor: cssnano,
|
||||
cssProcessorOptions: { discardComments: { removeAll: true } },
|
||||
cssProcessorOptions: {
|
||||
discardComments: { removeAll: true },
|
||||
autoprefixer: { browsers: config.browsers },
|
||||
},
|
||||
canPrint: true,
|
||||
}),
|
||||
new ImageminPlugin({
|
||||
|
||||
Reference in New Issue
Block a user