-
-
Notifications
You must be signed in to change notification settings - Fork 743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I can't show data via data attribute #378
Comments
any news so far? |
Could you please create a reproducible example with codesandbox or please |
Sure, I'll do it shorty and send it here. |
@ankri hello, I couldn't reproduce in the codesandbox just run into other issues, so just pushed to github. |
Hey @EdKo2001 - I found your problem. It's the way you import the json. I created a codesandbox for you. The problem is by importing the json via You can fix it by changing this line: const data = await import("../data/example.json");
- const formattedData = JSON.stringify(data);
+ const formattedData = JSON.stringify(data.default); btw: if you have a GitHub repo you can just import the repo as a codesandbox. pretty handy |
Wow, thank you a lot man! |
The error:
P.S. I've tried as JSON file from crast.js example and from saving my examples.
Your environment
The text was updated successfully, but these errors were encountered: