bippy
Version:
hack into react internals
38 lines (35 loc) • 1.15 kB
JavaScript
import './chunk-EPG3GO3H.js';
import { jsxDEV as jsxDEV$1 } from 'react/jsx-dev-runtime';
export * from 'react/jsx-dev-runtime';
export { Fragment } from 'react/jsx-dev-runtime';
/**
* @license bippy
*
* Copyright (c) Aiden Bai, Million Software, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var jsxDEV = (type, originalProps, key, isStatic, source, self) => {
let props = originalProps;
try {
if (originalProps && typeof originalProps === "object" && source && String(type) !== "Symbol(react.fragment)") {
if (typeof type === "string") {
const proto = Object.getPrototypeOf(originalProps);
const descriptors = Object.getOwnPropertyDescriptors(originalProps);
descriptors.__source = {
value: source,
enumerable: false,
configurable: true,
writable: true
};
props = Object.create(proto, descriptors);
} else {
props.__source = source;
}
}
} catch {
}
return jsxDEV$1(type, props, key, isStatic, source, self);
};
export { jsxDEV };