1
0
Fork 0

Fix embed build with old web browsers

This commit is contained in:
Chocobozzz 2023-02-21 14:20:15 +01:00
parent 7bbc062dcc
commit 39a88d24c7
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 18 additions and 14 deletions

View File

@ -68,6 +68,8 @@ module.exports = function () {
{
test: /\.ts$/,
use: [
getBabelLoader(),
{
loader: 'ts-loader',
options: {
@ -78,20 +80,7 @@ module.exports = function () {
},
{
test: /\.m?js$/,
use: [
{
loader: 'babel-loader',
options: {
presets: [
[
'@babel/preset-env', {
targets: 'last 1 Chrome version, last 2 Edge major versions, Firefox ESR, Safari >= 11, ios_saf >= 11'
}
]
]
}
}
]
use: [ getBabelLoader() ]
},
{
@ -217,3 +206,18 @@ module.exports = function () {
return configuration
}
function getBabelLoader () {
return {
loader: 'babel-loader',
options: {
presets: [
[
'@babel/preset-env', {
targets: 'last 1 Chrome version, last 2 Edge major versions, Firefox ESR, Safari >= 11, ios_saf >= 11'
}
]
]
}
}
}