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>
20 lines
609 B
JavaScript
20 lines
609 B
JavaScript
var semver = require('semver');
|
|
|
|
var current = process.version;
|
|
var supported = require('./package.json').engines.node;
|
|
|
|
if (!semver.satisfies(current, supported)) {
|
|
console.error(
|
|
'\n' +
|
|
'You are using node version ' + semver.valid(current) + '.\n\n' +
|
|
'check-node-version supports node verion ' + semver.valid(semver.minVersion(supported)) + ' and newer.\n\n' +
|
|
'Please do one of the following:\n' +
|
|
' 1. update your version of node\n' +
|
|
' 2. downgrade to version 3.3.0 of check-node-version\n\n' +
|
|
'We are sorry for the inconvenience.' +
|
|
'\n'
|
|
);
|
|
|
|
process.exit(1);
|
|
}
|