diff --git a/services/web/.babelrc b/services/web/.babelrc index b1dbfac8a3..ad4f2ca516 100644 --- a/services/web/.babelrc +++ b/services/web/.babelrc @@ -1,7 +1,11 @@ { "presets": [ "@babel/react", - ["@babel/env", { "modules": false }] + ["@babel/env", { + "modules": false, + "useBuiltIns": "usage", + "corejs": { "version": 3 } + }] ], "plugins": ["angularjs-annotate"] } \ No newline at end of file diff --git a/services/web/frontend/js/libraries.js b/services/web/frontend/js/libraries.js index 94d632efaa..7cdf36219c 100644 --- a/services/web/frontend/js/libraries.js +++ b/services/web/frontend/js/libraries.js @@ -1,25 +1,3 @@ -import 'core-js/stable/symbol' -import 'core-js/stable/symbol/async-iterator' -import 'core-js/stable/symbol/description' -import 'core-js/stable/symbol/has-instance' -import 'core-js/stable/symbol/is-concat-spreadable' -import 'core-js/stable/symbol/iterator' -import 'core-js/stable/symbol/match' -import 'core-js/stable/symbol/replace' -import 'core-js/stable/symbol/search' -import 'core-js/stable/symbol/species' -import 'core-js/stable/symbol/split' -import 'core-js/stable/symbol/to-primitive' -import 'core-js/stable/symbol/to-string-tag' -import 'core-js/stable/symbol/unscopables' -import 'core-js/stable/symbol/for' -import 'core-js/stable/symbol/key-for' -import 'core-js/stable/object/get-own-property-symbols' -import 'core-js/stable/promise' -import 'core-js/stable/math/to-string-tag' -import 'core-js/stable/array/fill' -import 'core-js/stable/array/from' -import 'core-js/stable/array/includes' import 'jquery' import 'angular' import 'angular-sanitize' diff --git a/services/web/package.json b/services/web/package.json index b02fd85306..7147d2f75e 100644 --- a/services/web/package.json +++ b/services/web/package.json @@ -28,6 +28,11 @@ "format:fix": "prettier-eslint '**/*.{js,less}' --write", "migrations": "east" }, + "browserslist": [ + "last 1 year", + "ie 11", + "firefox esr" + ], "dependencies": { "@babel/cli": "^7.8.4", "@babel/core": "^7.9.0", diff --git a/services/web/webpack.config.js b/services/web/webpack.config.js index cd8a70c6f0..f44db44049 100644 --- a/services/web/webpack.config.js +++ b/services/web/webpack.config.js @@ -56,8 +56,12 @@ module.exports = { { // Pass application JS files through babel-loader, compiling to ES5 test: /\.js$/, - // Only compile application files (dependencies are in ES5 already) - exclude: /node_modules/, + // Only compile application files (npm and vendored dependencies are in + // ES5 already) + exclude: [ + /node_modules/, + path.resolve(__dirname, 'frontend/js/vendor') + ], use: [ { loader: 'babel-loader', @@ -103,9 +107,7 @@ module.exports = { options: { // Uniquely identifies the postcss plugin (required by webpack) ident: 'postcss', - plugins: [ - require('autoprefixer')({ env: 'last 2 versions, ie >= 10' }) - ] + plugins: [require('autoprefixer')] } }, // Compiles the Less syntax to CSS