build: tweak Babel settings to match Scratch support FAQ

BREAKING CHANGE: this slightly changes our browser compatibility list
This commit is contained in:
Christopher Willis-Ford 2024-01-22 10:43:07 -08:00
parent cab158ae01
commit 484487694a
3 changed files with 9 additions and 4 deletions

View file

@ -10,6 +10,8 @@
[
"@babel/preset-env",
{
"bugfixes": true,
// This papers over the fact that our current code is inconsistent
// For example, we sometimes use `import` with a file that exports with `module.exports`
"modules": "commonjs"

View file

@ -177,8 +177,11 @@
"all": true
},
"browserslist": [
"last 3 versions",
"Safari >= 8",
"iOS >= 8"
"Chrome >= 63",
"Firefox >= 57",
"Edge >= 15",
"Safari >= 11",
"ChromeAndroid >= 63",
"ios_saf >= 11"
]
}

View file

@ -115,7 +115,7 @@ module.exports = {
module: {
rules: [
{
test: /\.jsx?$/,
test: /\.(?:js|mjs|cjs)x?$/,
loader: 'babel-loader',
include: [
path.resolve(__dirname, 'src'),