diff --git a/frontend/browsers.js b/frontend/browsers.js new file mode 100644 index 000000000..388d17446 --- /dev/null +++ b/frontend/browsers.js @@ -0,0 +1,6 @@ +module.exports = [ + '>0.25%', + 'not ie 11', + 'not op_mini all', + 'not chrome < 60' +]; diff --git a/frontend/gulp/webpack.js b/frontend/gulp/webpack.js index 11589c9f3..82a6dcd62 100644 --- a/frontend/gulp/webpack.js +++ b/frontend/gulp/webpack.js @@ -5,6 +5,7 @@ const path = require('path'); const webpack = require('webpack'); const errorHandler = require('./helpers/errorHandler'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); +const browsers = require('../browsers'); const uiFolder = 'UI'; const frontendFolder = path.join(__dirname, '..'); @@ -98,12 +99,7 @@ const config = { loose: true, debug: false, useBuiltIns: 'entry', - targets: [ - '>0.25%', - 'not ie 11', - 'not op_mini all', - 'not chrome < 60' - ] + targets: browsers } ] ] diff --git a/frontend/postcss.config.js b/frontend/postcss.config.js index 54a56b172..4aaf9f740 100644 --- a/frontend/postcss.config.js +++ b/frontend/postcss.config.js @@ -1,4 +1,5 @@ const reload = require('require-nocache')(module); +const browsers = require('./browsers'); module.exports = (ctx, configPath, options) => { const config = { @@ -17,15 +18,7 @@ module.exports = (ctx, configPath, options) => { 'postcss-color-function': {}, 'postcss-nested': {}, autoprefixer: { - browsers: [ - 'Chrome >= 30', - 'Firefox >= 30', - 'Safari >= 6', - 'Edge >= 12', - 'Explorer >= 11', - 'iOS >= 7', - 'Android >= 4.4' - ] + browsers } } };