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

Support watching file changes with vite build --watch #30

Open
Tanimodori opened this issue Oct 6, 2022 · 3 comments
Open

Support watching file changes with vite build --watch #30

Tanimodori opened this issue Oct 6, 2022 · 3 comments
Labels
enhancement New feature or request PR welcome

Comments

@Tanimodori
Copy link

Currently this plugin does not watch file changes on vite build --watch, the watch related code are serve-only. It would be better to support watching file changes with watched build.

@sapphi-red
Copy link
Owner

It would be nice to have this feature. But I suppose you can just use rollup-plugin-copy for that.

@sapphi-red sapphi-red added enhancement New feature or request PR welcome labels Oct 6, 2022
@ivancuric
Copy link

rollup-plugin-copy doesn't support that feature either:

vladshcherbin/rollup-plugin-copy#5

@larsactionhero
Copy link

If I understand you right, it is actually possible.
For example if you have a .js file, just save it, then build-watch will be triggered and files will be copied to destination folder as defined in vite config..

package.json:

"scripts": {
    "dev": "vite",
    "build": "vite build",
    "build-watch": "vite build --watch --config ./vite.config.js",
  },

Hope that I didn't misunderstand the problem. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request PR welcome
Projects
None yet
Development

No branches or pull requests

4 participants