Files
formipay/node_modules/valtio/system/macro.production.js
dwindown e8fbfb14c1 fix: prevent asset conflicts between React and Grid.js versions
Add coexistence checks to all enqueue methods to prevent loading
both React and Grid.js assets simultaneously.

Changes:
- ReactAdmin.php: Only enqueue React assets when ?react=1
- Init.php: Skip Grid.js when React active on admin pages
- Form.php, Coupon.php, Access.php: Restore classic assets when ?react=0
- Customer.php, Product.php, License.php: Add coexistence checks

Now the toggle between Classic and React versions works correctly.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 17:02:14 +07:00

2 lines
941 B
JavaScript

System.register(["@babel/helper-module-imports","@babel/types","babel-plugin-macros"],function(h){"use strict";var i,a,l,c;return{setters:[function(e){i=e.addNamed},function(e){a=e},function(e){l=e.createMacro,c=e.MacroError}],execute:function(){var P=h("default",l(({references:g})=>{var s;(s=g.useProxy)==null||s.forEach(r=>{var u,d,v,m,p,f;const x=i(r,"useSnapshot","valtio"),n=(d=(u=r.parentPath)==null?void 0:u.get("arguments.0"))==null?void 0:d.node;if(!a.isIdentifier(n))throw new c("no proxy object");const b=a.identifier(`valtio_macro_snap_${n.name}`);(m=(v=r.parentPath)==null?void 0:v.parentPath)==null||m.replaceWith(a.variableDeclaration("const",[a.variableDeclarator(b,a.callExpression(x,[n]))]));let t=0;(f=(p=r.parentPath)==null?void 0:p.getFunctionParent())==null||f.traverse({Identifier(o){t===0&&o.node!==n&&o.node.name===n.name&&(o.node.name=b.name)},Function:{enter(){++t},exit(){--t}}})})},{configName:"valtio"}))}}});