Skip to content

Instantly share code, notes, and snippets.

@domeglic
Created August 23, 2022 08:38
Show Gist options
  • Save domeglic/305f299372277d1a95d7dc587fa0f0bb to your computer and use it in GitHub Desktop.
Save domeglic/305f299372277d1a95d7dc587fa0f0bb to your computer and use it in GitHub Desktop.
Magento 2.4.4 magepack jquery ui requirejs bugfix
Fix jquery-ui effects anonymous define error when using magepack. See https://github.com/magesuite/magepack/issues/140 for more.
@package magento/magento2-base
diff --git a/lib/web/jquery/ui-modules/effects/effect-blind.js b/lib/web/jquery/ui-modules/effects/effect-blind.js
index 3b65a4f..513a89b 100644
--- a/lib/web/jquery/ui-modules/effects/effect-blind.js
+++ b/lib/web/jquery/ui-modules/effects/effect-blind.js
@@ -19,7 +19,7 @@
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
- define( [
+ define('jquery/ui-modules/effects/effect-blind', [
"jquery",
"../version",
"../effect"
diff --git a/lib/web/jquery/ui-modules/effects/effect-bounce.js b/lib/web/jquery/ui-modules/effects/effect-bounce.js
index 76e0f85..c5b1c1f 100644
--- a/lib/web/jquery/ui-modules/effects/effect-bounce.js
+++ b/lib/web/jquery/ui-modules/effects/effect-bounce.js
@@ -19,7 +19,7 @@
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
- define( [
+ define('jquery/ui-modules/effects/effect-bounce', [
"jquery",
"../version",
"../effect"
diff --git a/lib/web/jquery/ui-modules/effects/effect-clip.js b/lib/web/jquery/ui-modules/effects/effect-clip.js
index 12b49f4..5954547 100644
--- a/lib/web/jquery/ui-modules/effects/effect-clip.js
+++ b/lib/web/jquery/ui-modules/effects/effect-clip.js
@@ -19,7 +19,7 @@
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
- define( [
+ define('jquery/ui-modules/effects/effect-clip', [
"jquery",
"../version",
"../effect"
diff --git a/lib/web/jquery/ui-modules/effects/effect-drop.js b/lib/web/jquery/ui-modules/effects/effect-drop.js
index 8f3ba74..3451b06 100644
--- a/lib/web/jquery/ui-modules/effects/effect-drop.js
+++ b/lib/web/jquery/ui-modules/effects/effect-drop.js
@@ -19,7 +19,7 @@
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
- define( [
+ define('jquery/ui-modules/effects/effect-drop', [
"jquery",
"../version",
"../effect"
diff --git a/lib/web/jquery/ui-modules/effects/effect-explode.js b/lib/web/jquery/ui-modules/effects/effect-explode.js
index f3976fc..546c81b 100644
--- a/lib/web/jquery/ui-modules/effects/effect-explode.js
+++ b/lib/web/jquery/ui-modules/effects/effect-explode.js
@@ -21,7 +21,7 @@
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
- define( [
+ define('jquery/ui-modules/effects/effect-explode', [
"jquery",
"../version",
"../effect"
diff --git a/lib/web/jquery/ui-modules/effects/effect-fade.js b/lib/web/jquery/ui-modules/effects/effect-fade.js
index f84d6c4..d523404 100644
--- a/lib/web/jquery/ui-modules/effects/effect-fade.js
+++ b/lib/web/jquery/ui-modules/effects/effect-fade.js
@@ -19,7 +19,7 @@
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
- define( [
+ define('jquery/ui-modules/effects/effect-fade', [
"jquery",
"../version",
"../effect"
diff --git a/lib/web/jquery/ui-modules/effects/effect-fold.js b/lib/web/jquery/ui-modules/effects/effect-fold.js
index 682af57..c2e8a06 100644
--- a/lib/web/jquery/ui-modules/effects/effect-fold.js
+++ b/lib/web/jquery/ui-modules/effects/effect-fold.js
@@ -19,7 +19,7 @@
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
- define( [
+ define('jquery/ui-modules/effects/effect-fold', [
"jquery",
"../version",
"../effect"
diff --git a/lib/web/jquery/ui-modules/effects/effect-highlight.js b/lib/web/jquery/ui-modules/effects/effect-highlight.js
index 41ecc6f..7c6b72c 100644
--- a/lib/web/jquery/ui-modules/effects/effect-highlight.js
+++ b/lib/web/jquery/ui-modules/effects/effect-highlight.js
@@ -19,7 +19,7 @@
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
- define( [
+ define('jquery/ui-modules/effects/effect-highlight', [
"jquery",
"../version",
"../effect"
diff --git a/lib/web/jquery/ui-modules/effects/effect-puff.js b/lib/web/jquery/ui-modules/effects/effect-puff.js
index 4448843..737049b 100644
--- a/lib/web/jquery/ui-modules/effects/effect-puff.js
+++ b/lib/web/jquery/ui-modules/effects/effect-puff.js
@@ -19,7 +19,7 @@
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
- define( [
+ define('jquery/ui-modules/effects/effect-puff', [
"jquery",
"../version",
"../effect",
diff --git a/lib/web/jquery/ui-modules/effects/effect-pulsate.js b/lib/web/jquery/ui-modules/effects/effect-pulsate.js
index 0787e2a..7138c8a 100644
--- a/lib/web/jquery/ui-modules/effects/effect-pulsate.js
+++ b/lib/web/jquery/ui-modules/effects/effect-pulsate.js
@@ -19,7 +19,7 @@
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
- define( [
+ define('jquery/ui-modules/effects/effect-pulsate', [
"jquery",
"../version",
"../effect"
diff --git a/lib/web/jquery/ui-modules/effects/effect-scale.js b/lib/web/jquery/ui-modules/effects/effect-scale.js
index 0e4c291..af65927 100644
--- a/lib/web/jquery/ui-modules/effects/effect-scale.js
+++ b/lib/web/jquery/ui-modules/effects/effect-scale.js
@@ -19,7 +19,7 @@
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
- define( [
+ define('jquery/ui-modules/effects/effect-scale', [
"jquery",
"../version",
"../effect",
diff --git a/lib/web/jquery/ui-modules/effects/effect-shake.js b/lib/web/jquery/ui-modules/effects/effect-shake.js
index b12eb1f..ed63687 100644
--- a/lib/web/jquery/ui-modules/effects/effect-shake.js
+++ b/lib/web/jquery/ui-modules/effects/effect-shake.js
@@ -19,7 +19,7 @@
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
- define( [
+ define('jquery/ui-modules/effects/effect-shake', [
"jquery",
"../version",
"../effect"
diff --git a/lib/web/jquery/ui-modules/effects/effect-size.js b/lib/web/jquery/ui-modules/effects/effect-size.js
index 91aeea7..dada2f1 100644
--- a/lib/web/jquery/ui-modules/effects/effect-size.js
+++ b/lib/web/jquery/ui-modules/effects/effect-size.js
@@ -19,7 +19,7 @@
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
- define( [
+ define('jquery/ui-modules/effects/effect-size', [
"jquery",
"../version",
"../effect"
diff --git a/lib/web/jquery/ui-modules/effects/effect-slide.js b/lib/web/jquery/ui-modules/effects/effect-slide.js
index 1ce84f0..90d1061 100644
--- a/lib/web/jquery/ui-modules/effects/effect-slide.js
+++ b/lib/web/jquery/ui-modules/effects/effect-slide.js
@@ -19,7 +19,7 @@
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
- define( [
+ define('jquery/ui-modules/effects/effect-slide', [
"jquery",
"../version",
"../effect"
diff --git a/lib/web/jquery/ui-modules/effects/effect-transfer.js b/lib/web/jquery/ui-modules/effects/effect-transfer.js
index 231a4e6..539fded 100644
--- a/lib/web/jquery/ui-modules/effects/effect-transfer.js
+++ b/lib/web/jquery/ui-modules/effects/effect-transfer.js
@@ -19,7 +19,7 @@
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
- define( [
+ define('jquery/ui-modules/effects/effect-transfer', [
"jquery",
"../version",
"../effect"
@rhoerr
Copy link

rhoerr commented Oct 14, 2022

Note that as of 2.4.5-p1 you may also need

diff --git a/lib/web/jquery/ui-modules/core.js b/lib/web/jquery/ui-modules/core.js
--- a/lib/web/jquery/ui-modules/core.js
+++ b/lib/web/jquery/ui-modules/core.js
@@ -2,7 +2,7 @@
 ( function() {
 "use strict";

-define( [
+define('jquery/ui-modules/core', [
 	"jquery",
 	"./data",
 	"./disable-selection",

@niihal
Copy link

niihal commented Aug 29, 2023

Kindly Add steps, how to add this patch in magento2.4.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment