From 3e33a50e78586b7cd8e3407ad3bcd351edc9270d Mon Sep 17 00:00:00 2001 From: Hugo Alliaume Date: Wed, 14 Sep 2022 20:26:11 +0200 Subject: [PATCH] symfony/webpack-encore: bump to ^4.0.0, add peer dependencies webpack, webpack-cli, @babel/core and @babel/preset-env (#1123) * symfony/webpack-encore: bump to ^4.0.0, add peer dependencies webpack and webpack-cli * symfony/webpack-encore: add @babel/core and @babel/preset-env as dev deps --- symfony/webpack-encore-bundle/1.10/package.json | 6 +++++- symfony/webpack-encore-bundle/1.10/webpack.config.js | 9 +++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/symfony/webpack-encore-bundle/1.10/package.json b/symfony/webpack-encore-bundle/1.10/package.json index 058d0704..d83a414d 100644 --- a/symfony/webpack-encore-bundle/1.10/package.json +++ b/symfony/webpack-encore-bundle/1.10/package.json @@ -1,10 +1,14 @@ { "devDependencies": { + "@babel/core": "^7.17.0", + "@babel/preset-env": "^7.16.0", "@hotwired/stimulus": "^3.0.0", "@symfony/stimulus-bridge": "^3.2.0", - "@symfony/webpack-encore": "^3.0.0", + "@symfony/webpack-encore": "^4.0.0", "core-js": "^3.23.0", "regenerator-runtime": "^0.13.9", + "webpack": "^5.74.0", + "webpack-cli": "^4.10.0", "webpack-notifier": "^1.15.0" }, "license": "UNLICENSED", diff --git a/symfony/webpack-encore-bundle/1.10/webpack.config.js b/symfony/webpack-encore-bundle/1.10/webpack.config.js index 056b04aa..728942ac 100644 --- a/symfony/webpack-encore-bundle/1.10/webpack.config.js +++ b/symfony/webpack-encore-bundle/1.10/webpack.config.js @@ -45,11 +45,12 @@ Encore // enables hashed filenames (e.g. app.abc123.css) .enableVersioning(Encore.isProduction()) - .configureBabel((config) => { - config.plugins.push('@babel/plugin-proposal-class-properties'); - }) + // configure Babel + // .configureBabel((config) => { + // config.plugins.push('@babel/a-babel-plugin'); + // }) - // enables @babel/preset-env polyfills + // enables and configure @babel/preset-env polyfills .configureBabelPresetEnv((config) => { config.useBuiltIns = 'usage'; config.corejs = 3;