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
static file not being served in build #17
Comments
Hello @bwgjoseph It is indeed weird it doesn't work for As Docusaurus own website uses // import way
import schema from "@site/static/schema/geo.json"
// require way
require('@site/static/schema/geo.json').default} Worthy to mention, release 1.2.0 is on the road - I can notify you when it is ready ;) |
Usually on first visit after a build will get this I did read that, and tried import JSONSchemaViewer from "@theme/JSONSchemaViewer"
var schema = require('@site/static/schema/geo.json')
<JSONSchemaViewer schema={schema} /> And I just tried import JSONSchemaViewer from "@theme/JSONSchemaViewer"
const schema = require('@site/static/schema/geo.json').default
<JSONSchemaViewer schema={schema} /> Both way does not work too. Still getting the
Sure! Thanks for creating this plugin. |
hey, I managed to solve it (see facebook/docusaurus#8676 (comment)) (i think) |
I created a page to display all my json-schema (i,e /schema), I used
schema.mdx
file to display itIn each of the
mdx
file, it looks something like this but importing different json fileIn local development, it works as expected.
But when I build and serve it, it doesn't load the content
Not sure if it matters but I'm using
javascript
setup ofdocusaurus
instead oftypescript
.Let me know if more information is required, or if this is a
docusaurus
issue, then I can redirect over to their repo.Thanks!
The text was updated successfully, but these errors were encountered: