From 3aeb76ef4ec5e71c6959bc4e3e442e0ac8de21d1 Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Tue, 3 Sep 2024 14:07:12 +0200 Subject: [PATCH] Remove no-op argument The package.json check forbidding to add webpack as a dependency was removed in webpack-encore 4.0 when we made it mandatory to depend on webpack explicitly. --- index.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 3af837b8..67c85814 100644 --- a/index.js +++ b/index.js @@ -29,7 +29,7 @@ const parseRuntime = require('./lib/config/parse-runtime'); const context = require('./lib/context'); let runtimeConfig = context.runtimeConfig; -let webpackConfig = runtimeConfig ? new WebpackConfig(runtimeConfig, true) : null; +let webpackConfig = runtimeConfig ? new WebpackConfig(runtimeConfig) : null; class Encore { /** @@ -1660,10 +1660,9 @@ class Encore { * * @param {string} environment * @param {object} options - * @param {boolean} enablePackageJsonCheck * @returns {Encore} */ - configureRuntimeEnvironment(environment, options = {}, enablePackageJsonCheck = true) { + configureRuntimeEnvironment(environment, options = {}) { runtimeConfig = parseRuntime( Object.assign( {}, @@ -1673,7 +1672,7 @@ class Encore { process.cwd() ); - webpackConfig = new WebpackConfig(runtimeConfig, enablePackageJsonCheck); + webpackConfig = new WebpackConfig(runtimeConfig); return this; }