Closed ericclemmons closed 3 years ago
Do you mind letting me know which version of Node you're using?
also, if you have any more information about the usage context that would be great:
The issue is the default export format is ESNext
node --version
v14.16.0
This is being ran via https://create-react-app.dev/, so in the browser, no SSR.
what version of jsonx?
also can you try openingnode_modules/jsonx/src/examples/component-simple_syntax.html
in your browser and see if it works?
also can you include maybe a snippet of the usage?
try this in your browser:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>SIMPLE SYNTAX TEST</title>
<script src="https://unpkg.com/react@17.0.2/umd/react.production.min.js" type="text/javascript"></script>
<script src="https://unpkg.com/react-dom@17.0.2/umd/react-dom.production.min.js" type="text/javascript"></script>
<script src="https://unpkg.com/jsonx/dist/index.umd.core-min.js" type="text/javascript" ></script>
</head>
<body>
<div id="root"></div>
<script type="text/javascript">
const JXM = {
div:{
children:[
{ p:'super short'},
{ ul:[{li:'first'},{li:'second'}]},
]
}
}
const boundConfig = {
};
jsonx.jsonxRender.call(boundConfig,{
jsonx: JXM,
querySelector:'#root', });
</script>
</body>
</html>
should render this
if you're still having issues, I just pushed out a new UMDs that has legacy ES5 syntax
dist/index.web.core-legacy.js
dist/index.web.core-legacy-min.js
dist/index.umd.core-legacy.js
dist/index.umd.core-legacy-min.js
Looks like that fixed it! Thank you!
https://codesandbox.io/s/jsonx-cra-2o6fq?file=/src/App.js:100-266
Any recommendations on how to resolve this?