diff options
author | msquare <msquare@notrademark.de> | 2019-07-26 13:06:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-26 13:06:02 +0200 |
commit | aa11bead7cff72daa2ce71a03701d6d2875d7ec4 (patch) | |
tree | 23a6591b4a15086cf085e1884f1aab9981807c18 | |
parent | 1b3781cb2f38e6e8288447dff06ab94c4007824f (diff) | |
parent | a07e62ca67285633c478f706960167d5bb086a81 (diff) |
Merge pull request #628 from marudor/coreJs
Use core-js as polyfill to really support older browsers.
-rw-r--r-- | .babelrc | 9 | ||||
-rw-r--r-- | .browserslistrc | 2 | ||||
-rw-r--r-- | package.json | 4 | ||||
-rw-r--r-- | resources/assets/js/vendor.js | 1 | ||||
-rw-r--r-- | webpack.config.js | 3 |
5 files changed, 9 insertions, 10 deletions
@@ -1,13 +1,6 @@ { "presets": [["@babel/preset-env", { - "targets": { - "chrome": 45, - "firefox": 42, - "safari": 9, - "opera": 32, - "edge": 12, - "ios": 9 - }, + "corejs": 3, "loose": false, "useBuiltIns": "entry" }] diff --git a/.browserslistrc b/.browserslistrc new file mode 100644 index 00000000..fea4ca36 --- /dev/null +++ b/.browserslistrc @@ -0,0 +1,2 @@ +>1% +not ie > 9 diff --git a/package.json b/package.json index 5c902a45..c60f039e 100644 --- a/package.json +++ b/package.json @@ -14,8 +14,9 @@ }, "dependencies": { "bootstrap": "^3", - "eonasdan-bootstrap-datetimepicker": "^4.17.47", "chart.js": "^2", + "core-js": "^3", + "eonasdan-bootstrap-datetimepicker": "^4.17.47", "jquery": "^3.3.1", "jquery-ui": "^1.11.2", "moment": "^2.8.2", @@ -38,6 +39,7 @@ "optimize-css-assets-webpack-plugin": "^5.0.1", "rimraf": "^2.6.2", "style-loader": "^0.23.1", + "terser-webpack-plugin": "^1.3.0", "webpack": "^4.27.0", "webpack-cli": "^3.1.2" } diff --git a/resources/assets/js/vendor.js b/resources/assets/js/vendor.js index 1d61d42b..bf3807f7 100644 --- a/resources/assets/js/vendor.js +++ b/resources/assets/js/vendor.js @@ -1,3 +1,4 @@ +require('core-js/stable'); window.$ = window.jQuery = require('jquery'); require('imports-loader?define=>false!jquery-ui'); require('bootstrap'); diff --git a/webpack.config.js b/webpack.config.js index f25a37ea..45378a8a 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -2,6 +2,7 @@ const path = require('path'); const webpack = require('webpack'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin'); +const TerserPlugin = require('terser-webpack-plugin'); const nodeEnv = (process.env.NODE_ENV || 'development').trim(); // eslint-disable-next-line @@ -43,7 +44,7 @@ module.exports = { publicPath: '', }, optimization: { - minimizer: __DEV__ ? [] : [new OptimizeCSSAssetsPlugin({})], + minimizer: __DEV__ ? [] : [new OptimizeCSSAssetsPlugin({}), new TerserPlugin()], }, module: { rules: [ |