mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-23 16:26:02 +00:00
Transpile UI for old browsers
This commit is contained in:
parent
966e147a20
commit
7b5e8646eb
1 changed files with 19 additions and 2 deletions
|
@ -7,8 +7,8 @@ const errorHandler = require('./helpers/errorHandler');
|
||||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||||
|
|
||||||
const uiFolder = 'UI';
|
const uiFolder = 'UI';
|
||||||
const srcFolder = path.join(__dirname, '..', 'src');
|
|
||||||
const frontendFolder = path.join(__dirname, '..');
|
const frontendFolder = path.join(__dirname, '..');
|
||||||
|
const srcFolder = path.join(frontendFolder, 'src');
|
||||||
const isProduction = process.argv.indexOf('--production') > -1;
|
const isProduction = process.argv.indexOf('--production') > -1;
|
||||||
|
|
||||||
console.log('Source Folder:', srcFolder);
|
console.log('Source Folder:', srcFolder);
|
||||||
|
@ -89,7 +89,24 @@ const config = {
|
||||||
loader: 'babel-loader',
|
loader: 'babel-loader',
|
||||||
options: {
|
options: {
|
||||||
configFile: `${frontendFolder}/babel.config.js`,
|
configFile: `${frontendFolder}/babel.config.js`,
|
||||||
envName: isProduction ? 'production' : 'development'
|
envName: isProduction ? 'production' : 'development',
|
||||||
|
presets: [
|
||||||
|
[
|
||||||
|
'@babel/preset-env',
|
||||||
|
{
|
||||||
|
modules: false,
|
||||||
|
loose: true,
|
||||||
|
debug: false,
|
||||||
|
useBuiltIns: 'entry',
|
||||||
|
targets: [
|
||||||
|
'>0.25%',
|
||||||
|
'not ie 11',
|
||||||
|
'not op_mini all',
|
||||||
|
'not chrome < 60'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue