Babel: Target more modern browsers, updates browserlistrc (#32573)
* Babel: Target more modern browsers, updates browserlistrc * Updates * Fixed circular dependencies, grafana booted
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
module.exports = function getBabelConfig() {
|
||||
module.exports = function getBabelConfig(options = {}) {
|
||||
return {
|
||||
cacheDirectory: true,
|
||||
babelrc: false,
|
||||
@@ -8,12 +8,10 @@ module.exports = function getBabelConfig() {
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
targets: {
|
||||
browsers: 'last 3 versions',
|
||||
},
|
||||
bugfixes: true,
|
||||
browserslistEnv: process.env.BABEL_ENV || options.BABEL_ENV || 'production',
|
||||
useBuiltIns: 'entry',
|
||||
corejs: 3,
|
||||
modules: false,
|
||||
corejs: '3.10',
|
||||
},
|
||||
],
|
||||
[
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
const path = require('path');
|
||||
|
||||
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
|
||||
const getBabelConfig = require('./babel.config');
|
||||
|
||||
// https://github.com/visionmedia/debug/issues/701#issuecomment-505487361
|
||||
function shouldExclude(filename) {
|
||||
@@ -129,9 +130,7 @@ module.exports = {
|
||||
use: [
|
||||
{
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
presets: [['@babel/preset-env']],
|
||||
},
|
||||
options: getBabelConfig(),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -36,7 +36,7 @@ module.exports = (env = {}) =>
|
||||
use: [
|
||||
{
|
||||
loader: 'babel-loader',
|
||||
options: getBabelConfig(),
|
||||
options: getBabelConfig({ BABEL_ENV: 'dev' }),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user