Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 BUG: vite build without an index.html doesn't copy over assets directory to /dist #8100

Closed
threepointone opened this issue Feb 11, 2025 · 2 comments
Labels
bug Something that isn't working vite-plugin Relating to the `@cloudflare/vite-plugin` package

Comments

@threepointone
Copy link
Contributor

Which Cloudflare product(s) does this pertain to?

Wrangler

What versions are you using?

@cloudflare/[email protected]

What operating system and version are you using?

Mac OS

Please provide a link to a minimal reproduction

No response

Describe the Bug

if there's no index.html, then the assets directory doesn't get copied to /dist, so wrangler deploy fails with an error The directory specified by the "assets.directory" field in your configuration file does not exist:.

I thought a workaround would be to manually copy, so I ran rm -rf dist && vite build && mkdir -p dist/client && cp -r public/* dist/client && wrangler deploy but even tho that copies files and prevents wrangler from erroring, wrangler deploy doesn't pick up any files and upload from from there.

Image

Please provide any relevant error logs

No response

@threepointone threepointone added bug Something that isn't working vite-plugin Relating to the `@cloudflare/vite-plugin` package labels Feb 11, 2025
@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Feb 11, 2025
@threepointone
Copy link
Contributor Author

now that I think about it, it can't do because vite hasn't run my app to get the entry point to my js. which makes sense. while this isn't a bug, it's definitely something to consider...

@threepointone
Copy link
Contributor Author

closing this, usually solved in userland/frameworks

@github-project-automation github-project-automation bot moved this from Untriaged to Done in workers-sdk Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that isn't working vite-plugin Relating to the `@cloudflare/vite-plugin` package
Projects
Status: Done
Development

No branches or pull requests

1 participant