docs(bug): vitepress console warning, playground image
andretchen0 opened this issue · comments
andretchen0 commented
Describe the bug
When running pnpm run docs:dev
and visiting http://localhost:5173/guide/
the terminal displays the following warning:
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.
Reproduction
None
Steps to reproduce
- In the terminal, run
pnpm run docs:dev
- In the browser, visit
http://localhost:5173/guide/
- In the terminal, see the warning
System Info
System:
OS: macOS 14.0
CPU: (8) arm64 Apple M1
Memory: 136.88 MB / 8.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.8.1 - /opt/homebrew/bin/node
npm: 10.1.0 - /opt/homebrew/bin/npm
pnpm: 8.6.5 - /opt/homebrew/bin/pnpm
Browsers:
Chrome: 120.0.6099.234
Safari: 17.0
npmPackages:
@tresjs/cientos: 3.7.0 => 3.7.0
@tresjs/eslint-config-vue: ^0.2.1 => 0.2.1
vite: ^5.0.10 => 5.0.10
Used Package Manager
pnpm
Code of Conduct
- I agree to follow this project's Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- The provided reproduction is a minimal reproducible example of the bug.