Use core-js as polyfill to really support older browsers.
This commit is contained in:
parent
1b3781cb2f
commit
a07e62ca67
9
.babelrc
9
.babelrc
|
@ -1,13 +1,6 @@
|
||||||
{
|
{
|
||||||
"presets": [["@babel/preset-env", {
|
"presets": [["@babel/preset-env", {
|
||||||
"targets": {
|
"corejs": 3,
|
||||||
"chrome": 45,
|
|
||||||
"firefox": 42,
|
|
||||||
"safari": 9,
|
|
||||||
"opera": 32,
|
|
||||||
"edge": 12,
|
|
||||||
"ios": 9
|
|
||||||
},
|
|
||||||
"loose": false,
|
"loose": false,
|
||||||
"useBuiltIns": "entry"
|
"useBuiltIns": "entry"
|
||||||
}]
|
}]
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
>1%
|
||||||
|
not ie > 9
|
|
@ -14,8 +14,9 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bootstrap": "^3",
|
"bootstrap": "^3",
|
||||||
"eonasdan-bootstrap-datetimepicker": "^4.17.47",
|
|
||||||
"chart.js": "^2",
|
"chart.js": "^2",
|
||||||
|
"core-js": "^3",
|
||||||
|
"eonasdan-bootstrap-datetimepicker": "^4.17.47",
|
||||||
"jquery": "^3.3.1",
|
"jquery": "^3.3.1",
|
||||||
"jquery-ui": "^1.11.2",
|
"jquery-ui": "^1.11.2",
|
||||||
"moment": "^2.8.2",
|
"moment": "^2.8.2",
|
||||||
|
@ -38,6 +39,7 @@
|
||||||
"optimize-css-assets-webpack-plugin": "^5.0.1",
|
"optimize-css-assets-webpack-plugin": "^5.0.1",
|
||||||
"rimraf": "^2.6.2",
|
"rimraf": "^2.6.2",
|
||||||
"style-loader": "^0.23.1",
|
"style-loader": "^0.23.1",
|
||||||
|
"terser-webpack-plugin": "^1.3.0",
|
||||||
"webpack": "^4.27.0",
|
"webpack": "^4.27.0",
|
||||||
"webpack-cli": "^3.1.2"
|
"webpack-cli": "^3.1.2"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
require('core-js/stable');
|
||||||
window.$ = window.jQuery = require('jquery');
|
window.$ = window.jQuery = require('jquery');
|
||||||
require('imports-loader?define=>false!jquery-ui');
|
require('imports-loader?define=>false!jquery-ui');
|
||||||
require('bootstrap');
|
require('bootstrap');
|
||||||
|
|
|
@ -2,6 +2,7 @@ const path = require('path');
|
||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||||
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
||||||
|
const TerserPlugin = require('terser-webpack-plugin');
|
||||||
const nodeEnv = (process.env.NODE_ENV || 'development').trim();
|
const nodeEnv = (process.env.NODE_ENV || 'development').trim();
|
||||||
|
|
||||||
// eslint-disable-next-line
|
// eslint-disable-next-line
|
||||||
|
@ -43,7 +44,7 @@ module.exports = {
|
||||||
publicPath: '',
|
publicPath: '',
|
||||||
},
|
},
|
||||||
optimization: {
|
optimization: {
|
||||||
minimizer: __DEV__ ? [] : [new OptimizeCSSAssetsPlugin({})],
|
minimizer: __DEV__ ? [] : [new OptimizeCSSAssetsPlugin({}), new TerserPlugin()],
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
|
|
Loading…
Reference in New Issue