generated from tod/odin-webpack-template
Add Babel
This commit is contained in:
parent
12eb673c90
commit
8595d32e1c
File diff suppressed because it is too large
Load Diff
|
@ -13,6 +13,9 @@
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@babel/core": "^7.23.9",
|
||||||
|
"@babel/preset-env": "^7.23.9",
|
||||||
|
"babel-loader": "^9.1.3",
|
||||||
"css-loader": "^6.10.0",
|
"css-loader": "^6.10.0",
|
||||||
"eslint": "^8.56.0",
|
"eslint": "^8.56.0",
|
||||||
"eslint-config-airbnb": "^19.0.4",
|
"eslint-config-airbnb": "^19.0.4",
|
||||||
|
@ -24,7 +27,7 @@
|
||||||
"postcss-preset-env": "^9.4.0",
|
"postcss-preset-env": "^9.4.0",
|
||||||
"prettier": "3.2.5",
|
"prettier": "3.2.5",
|
||||||
"style-loader": "^3.3.4",
|
"style-loader": "^3.3.4",
|
||||||
"webpack": "^5.90.1",
|
"webpack": "^5.90.3",
|
||||||
"webpack-cli": "^5.1.4",
|
"webpack-cli": "^5.1.4",
|
||||||
"webpack-dev-server": "^4.15.1",
|
"webpack-dev-server": "^4.15.1",
|
||||||
"webpack-merge": "^5.10.0"
|
"webpack-merge": "^5.10.0"
|
||||||
|
|
|
@ -16,6 +16,16 @@ module.exports = {
|
||||||
test: /\.(woff|woff2|otf|ttf|eot)$/i,
|
test: /\.(woff|woff2|otf|ttf|eot)$/i,
|
||||||
type: "asset/resource",
|
type: "asset/resource",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
test: /\.(?:js|mjs|cjs)$/,
|
||||||
|
exclude: /node_modules/,
|
||||||
|
use: {
|
||||||
|
loader: "babel-loader",
|
||||||
|
options: {
|
||||||
|
presets: [["@babel/preset-env", { targets: "defaults" }]],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
|
|
Loading…
Reference in New Issue