`vite: { legacy: false }`: After running `run build`, assets resources cannot be accessed.
Open
Nobody has claimed this yet.
pending triage
- Dominant language
- TypeScript
- Stars
- 285
- Forks
- 33
- Avg merge
- 22h 38m
- Merged PRs (30d)
- 3
Description
Environment
- Operating System: Darwin
- Node Version: v22.9.0
- Nuxt Version: 2.18.1
- CLI Version: 3.14.0
- Nitro Version: 2.9.7
- Package Manager: npm@10.8.3
- Builder: webpack
- User Config: -
- Runtime Modules: -
- Build Modules: -
Why? i using vite
Reproduction
https://stackblitz.com/~/github.com/medz/github-ocrw7j
Describe the bug
After enabling vite and running nuxi build, the static images will be renamed to xxx-xxx.png and referenced to xxx.xxx.png in the vue template.
Additional context
npm run build
npm run start
Logs
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked StackBlitz reproduction and run npm run build followed by npm run start. Compare the generated static image names with the references in the Vue templates; the issue is done when built assets are accessible and their generated names match the references.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nuxt, typescript, vite, webpack
- Domain
- build-system, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100