-
Notifications
You must be signed in to change notification settings - Fork 152
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
Vite asset misses some files when processed #132
Comments
Hey @Rizky92, Thanks so much for providing the repo to test against. It really helps us. This is a known issue that we have a fix for, bu in the meantime you will need to make the following adjustment to your vite config: import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
export default defineConfig({
plugins: [
laravel({
input: ['resources/css/app.css', 'resources/js/app.js'],
refresh: true,
}),
],
+ build: {
+ assetsInlineLimit: 0
+ }
}); You might wanna keep an eye on this PR: #131. Once it is merged and tagged you can then remove that config option. Thanks again and sorry you ran into this issue. |
Thank you @timacdonald. Is there any chance that vite perform checks for specific file types? |
I didn't notice them missing. Let me take a look at those for you. |
Transferred this to the vite-plugin repo. |
@Rizky92 whoa. that was a rabbit hole I just went down on this one! It seems that files that are 100% identical are causing this issue. I've created a PR to Vite in an attempt to fix this, although I'm not 100% sure if this is the "correct" fix from a Vite perspective (build tools are hard). Attempted fix: vitejs/vite#9928 For now you may have to create a "shared" directory and put any shared resources across clients in there (i.e. any files that are globed that exactly identical). Hopefully we can get a resolution for this via Vite, but there isn't anything we can do in our plugin to fix this one. It will need upstream changes. |
Thank you very much @timacdonald. Once again, thank you. |
Will close this as this isn't a bug in the plugin. We can follow along upstream and see if we can get anything sorted. |
Looks like the PR is being considered for Vite |
Just a heads up that the upstream fix for this has now been tagged in vite |
Others:
I followed the documentation about processing static assets to process my static asset files. However, some files were missed by vite.
My files contains a lot of repeated filenames and identical structure, with only difference is the origin name of the directory, like example:
Repo: https://github.com/Rizky92/bug-report
The text was updated successfully, but these errors were encountered: