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,
|
watcher: !!argv.watch,
|
||||||
},
|
},
|
||||||
watch: [],
|
watch: [],
|
||||||
|
browsers: [],
|
||||||
}, userConfig);
|
}, userConfig);
|
||||||
|
|
||||||
config.watch.push(`${path.basename(config.paths.assets)}/${config.copy}`);
|
config.watch.push(`${path.basename(config.paths.assets)}/${config.copy}`);
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ let webpackConfig = {
|
|||||||
output: { path: config.paths.dist },
|
output: { path: config.paths.dist },
|
||||||
context: config.paths.assets,
|
context: config.paths.assets,
|
||||||
postcss: [
|
postcss: [
|
||||||
autoprefixer({ browsers: ['last 2 versions', 'android 4', 'opera 12'] }),
|
autoprefixer({ browsers: config.browsers }),
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -11,7 +11,10 @@ module.exports = {
|
|||||||
plugins: [
|
plugins: [
|
||||||
new OptimizeCssAssetsPlugin({
|
new OptimizeCssAssetsPlugin({
|
||||||
cssProcessor: cssnano,
|
cssProcessor: cssnano,
|
||||||
cssProcessorOptions: { discardComments: { removeAll: true } },
|
cssProcessorOptions: {
|
||||||
|
discardComments: { removeAll: true },
|
||||||
|
autoprefixer: { browsers: config.browsers },
|
||||||
|
},
|
||||||
canPrint: true,
|
canPrint: true,
|
||||||
}),
|
}),
|
||||||
new ImageminPlugin({
|
new ImageminPlugin({
|
||||||
|
|||||||
@@ -15,5 +15,10 @@
|
|||||||
"publicPath": "/app/themes/sage",
|
"publicPath": "/app/themes/sage",
|
||||||
"devUrl": "http://example.dev",
|
"devUrl": "http://example.dev",
|
||||||
"proxyUrl": "http://localhost:3000",
|
"proxyUrl": "http://localhost:3000",
|
||||||
"cacheBusting": "[name]_[hash:8]"
|
"cacheBusting": "[name]_[hash:8]",
|
||||||
|
"browsers": [
|
||||||
|
"last 2 versions",
|
||||||
|
"android 4",
|
||||||
|
"opera 12"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user