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

Possible to work in lib mode? #18

Open
ivancuric opened this issue Mar 9, 2023 · 4 comments
Open

Possible to work in lib mode? #18

ivancuric opened this issue Mar 9, 2023 · 4 comments

Comments

@ivancuric
Copy link

Like the title says, I've tried using this in lib mode, however it doesn't trigger a reload like it does in normal mode.

Is this possible to do?

@ElMassimo
Copy link
Owner

Hi Ivan!

Haven't tried with Library Mode, but I think that only affects vite build.

With Vite, you can use your index.html for that purpose to get the smooth development experience.

As long as you are importing your library and visiting the local Vite dev server in your browser, I'd expect it to work as usual.

@ivancuric
Copy link
Author

The thing is that I'm using a monorepo. One package builds some WASM that is symlinked to another package's public folder. The files in public are moved to dist during vite build --watch --mode development.

However, recompiling the WASM won't trigger vite's file watcher as it's not looking inside the public folder.

@ElMassimo
Copy link
Owner

ElMassimo commented Mar 9, 2023

What configuration are you using for vite-plugin-full-reload?

Also, is Vite detecting changes but not reloading the page, or is it not detecting changes at all?

Finally, are the modified files being imported in a file processed by Vite?

@ivancuric
Copy link
Author

Nothing specific, but the modified files aren't being imported in a file processed by vite.

I think I'll need to look for another approach.

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

No branches or pull requests

2 participants