Skip to content

Conversation

andretchen0
Copy link
Contributor

Closes #518

Problem

When running pnpm run docs:dev a warning was being printed to the terminal about an image path:

5:05:06 PM [vitepress] hmr update /guide/index.md
Assets in public directory cannot be imported from JavaScript.
If you intend to import that asset, put the file in the src directory, and use /src/playground.png instead of /public/playground.png.
If you intend to use the URL of that asset, use /playground.png?url.
Files in the public directory are served at the root path.
Instead of /public/playground.png, use /playground.png.

Solution

This updates the image path to remove the warning.

@andretchen0 andretchen0 linked an issue Jan 21, 2024 that may be closed by this pull request
5 tasks
Copy link

netlify bot commented Jan 21, 2024

Deploy Preview for tresjs-docs ready!

Name Link
🔨 Latest commit ab96741
🔍 Latest deploy log https://app.netlify.com/sites/tresjs-docs/deploys/65ad43aa2d4dc90008b84a4e
😎 Deploy Preview https://deploy-preview-519--tresjs-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@andretchen0 andretchen0 changed the title fix(docs): change image path to silence warning, #518 docs(fix): change image path to silence warning, #518 Jan 21, 2024
@andretchen0 andretchen0 changed the title docs(fix): change image path to silence warning, #518 docs: change image path to silence warning, #518 Jan 22, 2024
@alvarosabu alvarosabu merged commit 280d248 into main Jan 22, 2024
@andretchen0 andretchen0 deleted the 518-bugdocs-vitepress-console-warning-playground-image branch February 6, 2024 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

docs(bug): vitepress console warning, playground image
2 participants