Add Babel

This commit is contained in:
NetMan 2024-02-24 18:33:22 +01:00
parent 12eb673c90
commit 8595d32e1c
3 changed files with 2071 additions and 3 deletions

2059
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -13,6 +13,9 @@
"author": "",
"license": "ISC",
"devDependencies": {
"@babel/core": "^7.23.9",
"@babel/preset-env": "^7.23.9",
"babel-loader": "^9.1.3",
"css-loader": "^6.10.0",
"eslint": "^8.56.0",
"eslint-config-airbnb": "^19.0.4",
@ -24,7 +27,7 @@
"postcss-preset-env": "^9.4.0",
"prettier": "3.2.5",
"style-loader": "^3.3.4",
"webpack": "^5.90.1",
"webpack": "^5.90.3",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.10.0"

View File

@ -16,6 +16,16 @@ module.exports = {
test: /\.(woff|woff2|otf|ttf|eot)$/i,
type: "asset/resource",
},
{
test: /\.(?:js|mjs|cjs)$/,
exclude: /node_modules/,
use: {
loader: "babel-loader",
options: {
presets: [["@babel/preset-env", { targets: "defaults" }]],
},
},
},
],
},
plugins: [