From b17f76021754c171592e3d1685ba2ce7ed8fa342 Mon Sep 17 00:00:00 2001 From: Vincent Fretin Date: Wed, 18 Sep 2024 18:12:36 +0200 Subject: [PATCH] Update webpack and associated loaders, node 18.12.0 is now the minimum version required, remove webpack-merge, webpack now supports extending another configuration (#5480) --- package.json | 15 +++++++-------- webpack.config.js | 3 --- webpack.prod.config.js | 7 +++---- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 151c63fbb3e..e6e527fa332 100644 --- a/package.json +++ b/package.json @@ -45,14 +45,14 @@ "webvr-polyfill": "^0.10.12" }, "devDependencies": { - "@babel/core": "^7.17.10", - "babel-loader": "^8.2.5", + "@babel/core": "^7.24.0", + "babel-loader": "^9.1.3", "babel-plugin-istanbul": "^6.1.1", "chai": "^4.3.6", "chai-shallow-deep-equal": "^1.4.0", "chalk": "^1.1.3", "cross-env": "^7.0.3", - "css-loader": "^6.7.1", + "css-loader": "^7.1.2", "eslint": "^8.45.0", "eslint-config-semistandard": "^17.0.0", "eslint-config-standard-jsx": "^11.0.0", @@ -81,12 +81,11 @@ "sinon-chai": "^3.7.0", "snazzy": "^5.0.0", "standardx": "^7.0.0", - "style-loader": "^3.3.1", + "style-loader": "^4.0.0", "too-wordy": "ngokevin/too-wordy", - "webpack": "^5.73.0", - "webpack-cli": "^4.10.0", - "webpack-dev-server": "^4.11.0", - "webpack-merge": "^5.8.0", + "webpack": "^5.91.0", + "webpack-cli": "^5.1.4", + "webpack-dev-server": "^5.0.4", "write-good": "^1.0.8" }, "link": true, diff --git a/webpack.config.js b/webpack.config.js index 1c098c7a778..cbecc7ec19c 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -36,9 +36,6 @@ module.exports = { test: /\.js$/, use: { loader: 'babel-loader' - // options: { - // presets: ['@babel/preset-env'], - // }, } }, { diff --git a/webpack.prod.config.js b/webpack.prod.config.js index ed53847ed55..897ff8c542a 100644 --- a/webpack.prod.config.js +++ b/webpack.prod.config.js @@ -1,9 +1,8 @@ var path = require('path'); -var merge = require('webpack-merge').merge; -var commonConfiguration = require('./webpack.config.js'); var TerserPlugin = require('terser-webpack-plugin'); -module.exports = merge(commonConfiguration, { +module.exports = { + extends: ['webpack.config.js'], output: { library: 'AFRAME', libraryTarget: 'umd', @@ -28,4 +27,4 @@ module.exports = merge(commonConfiguration, { }) ] } -}); +};