-
Notifications
You must be signed in to change notification settings - Fork 51
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
Not working well in a Laravel project using Vite #68
Comments
I ran into this as well, but was able to work around it with the right What I observed was that upon starting the Vite dev server, nothing was copied, but once I killed the process the files would be copied. Upon looking further into the way that this package works, this makes sense, as it defaults to writing the files on If I set the So, I have a configuration like this, which seems to be working as I would expect it to! import * as path from "node:path";
import copy from "rollup-plugin-copy";
/** @type {import('vite').UserConfig} */
export default {
plugins: [
copy({
targets: [
{
src: path.resolve(__dirname, "path/to/thing"),
dest: path.resolve(__dirname, "public/path/to/thing"),
},
],
hook: "buildStart",
copyOnce: true,
}),
],
}; |
Hello everyone, I am also facing the same problem now. Firstly, I strongly agree with alexlafroscia's view. Through my observation, I found that the copy({
hook: "closeBundle",
targets: [
{ src: './dll/*', dest: 'dist/dll' },
]
}), |
Using
Issue
I'm using the plugin in a Laravel project with Vite.
I have this part of code inserted in the
vite.config.js
file:When i run the command
npm run dev
the plugin seems to not do anything, nothing is copied, but then if i change something in thevite.config.js
file the vite watcher executes again automatically and this time the plugin works as expected and the folder is copied:So far i haven't figured out how to make it work at first instruction. I tried a couple different
hooks
too, but to no avail.Any ideas? Thanks.
The text was updated successfully, but these errors were encountered: