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

rollup-plugin-copy #1231

Closed
wang-siwen opened this issue Dec 14, 2020 · 4 comments
Closed

rollup-plugin-copy #1231

wang-siwen opened this issue Dec 14, 2020 · 4 comments

Comments

@wang-siwen
Copy link

When packing with vite, I used ‘rollup-plugin-copy’ to copy some files. During the packaging process, you can see that the files are copied correctly. However, after packing, the files with good copy were deleted. How can I configure it so that my copy files will not be deleted?

@wang-siwen
Copy link
Author

1607927941(1)
1607927983(1)

@underfin
Copy link
Member

underfin commented Jan 3, 2021

It should work for 2.0, but you should use like this.

import copy from 'rollup-plugin-copy'

export default defineConfig({
  plugins: [
    copy({
      targets: [ ],
      hook: 'writeBundle' // notice here
    })]
})

@underfin underfin closed this as completed Jan 3, 2021
@Robin-Hoodie
Copy link
Contributor

Just bumped into the same thing, is this documented anywhere?

@patak-dev
Copy link
Member

@Robin-Hoodie comments in old issues are probably going to be ignored. Please start a GitHub Discussion or join the chat at Vite Land to ask questions.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants