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", "@babel/preset-env",
{ {
"bugfixes": true,
// This papers over the fact that our current code is inconsistent // 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` // For example, we sometimes use `import` with a file that exports with `module.exports`
"modules": "commonjs" "modules": "commonjs"

View file

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

View file

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