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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Allow passing a root option that is different than Vite's root #3

Merged
merged 1 commit into from Mar 17, 2021

Conversation

ElMassimo
Copy link
Contributor

@ElMassimo ElMassimo commented Mar 16, 2021

Description 馃摉

This pull request closes #2 by adding a root config option to resolve files against, instead of using Vite's root.

Usage 馃殌

import LiveReload from 'vite-plugin-live-reload'

export default defineConfig({
  plugins: [
    LiveReload(['config/routes.rb', 'app/views/**/*'], { root: process.cwd() }),

Background 馃摐

Implemented something similar to this library because I needed it, but before publishing I found this package, and thought it would be nicer to contribute to it instead.

@arnoson
Copy link
Owner

arnoson commented Mar 17, 2021

Looks great! I've been thinking about the same feature as I use the plugin mainly to watch files outside of Vite's root, thank you very much for adding it :) I will merge it and release a new version soon

@arnoson arnoson merged commit 68ae561 into arnoson:main Mar 17, 2021
@ElMassimo ElMassimo deleted the root branch March 17, 2021 11:54
@ElMassimo
Copy link
Contributor Author

Excellent, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancement: Allow passing a root option to use instead of Vite's root
2 participants