Replies: 1 comment
-
|
I have no idea what you are doing 🤪 🤷♂️ You show me code snippets and don't explain how they are related nor what they are supposed to do, so it's hard to understand. But it looks fragile and not a good idea.
Which asset exactly? Please give all the info at once, I won't explore your site source to try to figure it out. If this is the file you need to load: It's a JSON file so why do you need to import it dynamically? you can as well just to You can also use
I don't even understand how this sentence is related to the rest 🤷♂️ Maybe you'll find this useful: https://docusaurus.io/docs/markdown-features/react#importing-code-snippets There are also remark plugins that can help, I'm not familiar with all of them and you can write your own.
Webpack settings can disable warnings. It is now your responsibility to figure out if you should do this or not. I don't understand your goal and can't recommend anything. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
Somewhere in my website (source) , I needed to retrieve some assets to be displayed on the page.
So I built following function :
It works but I got this warning when doing a
docusaurus build:Warning: {"moduleIdentifier":"/home/runner/work/docusaurus-json-schema-plugin/docusaurus-json-schema-plugin/testsite/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!/home/runner/work/docusaurus-json-schema-plugin/docusaurus-json-schema-plugin/testsite/src/components/shared-libs/localFileResolver.tsx","moduleName":"./src/components/shared-libs/localFileResolver.tsx","loc":"3:89-99","message":"Critical dependency: the request of a dependency is an expression","compilerPath":"server"}I think it might be a good opportunity to have a proper discussion around it as :
<CodeBlock>allows to import local filesThanks in advance
Beta Was this translation helpful? Give feedback.
All reactions