Skip to content

Commit

Permalink
Use core-js as polyfill to really support older browsers.
Browse files Browse the repository at this point in the history
  • Loading branch information
marudor committed Jul 26, 2019
1 parent 1b3781c commit a07e62c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
9 changes: 1 addition & 8 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -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"
}]
Expand Down
2 changes: 2 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
>1%
not ie > 9
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
}
Expand Down
1 change: 1 addition & 0 deletions resources/assets/js/vendor.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require('core-js/stable');
window.$ = window.jQuery = require('jquery');
require('imports-loader?define=>false!jquery-ui');
require('bootstrap');
Expand Down
3 changes: 2 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -43,7 +44,7 @@ module.exports = {
publicPath: '',
},
optimization: {
minimizer: __DEV__ ? [] : [new OptimizeCSSAssetsPlugin({})],
minimizer: __DEV__ ? [] : [new OptimizeCSSAssetsPlugin({}), new TerserPlugin()],
},
module: {
rules: [
Expand Down

0 comments on commit a07e62c

Please sign in to comment.