-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Labels
bugAn error in the Docusaurus core causing instability or issues with its executionAn error in the Docusaurus core causing instability or issues with its execution
Description
🐛 Bug Report
Prerequisites
- I'm using the latest version of Docusaurus.
- I have tried the
npm run clearoryarn clearcommand. - I have tried
rm -rf node_modules yarn.lock package-lock.jsonand re-installing packages. - I have tried creating a repro with https://new.docusaurus.io
- I have read the console error message carefully (if applicable)
Description
Suppose you have the below code in any .md (doc or blog) file:
import Image from '@theme/IdealImage';
import docusaurus from '/img/docusaurus.png';
The below code works well:
<Image img={require('/img/docusaurus.png')}/>
But this one doesn't work:
<Image img={docusaurus}/>
This code used to work in 2.0.0-beta.6 but I tried 2.0.0-beta.7 and Canary 0.0.0-4102 and it doesn't work.
Also, this is based on docs below:
https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-ideal-image
I should mention when I run npm run build and then npm run serve it works well. But the problem happens when I use npm start only.
Have you read the Contributing Guidelines on issues?
Yes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugAn error in the Docusaurus core causing instability or issues with its executionAn error in the Docusaurus core causing instability or issues with its execution