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

[TASK] Remove rename side effect #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

megamisan
Copy link

When using an external watcher or using the watch mode from vite, the side-effect of renaming file on build start and back on build end triggers a new run indefinitly.

This change removes the renaming and tries to resolve the original file name when it detects an html file following the renaming pattern. It delegates the resolution back to vite and especially vite:resolver which originaly handled the resolution.

It also handles the file content loading as it is no more handled by vite:load-fallback, using the real file name instead of module id if known.

Remark: It can be applied to the other templating plugins.

@megamisan megamisan force-pushed the remove-rename-side-effect branch 3 times, most recently from b35ce76 to 90e95a0 Compare December 8, 2023 15:57
Changes renames on build start and end to custom id resolver and load
@megamisan megamisan force-pushed the remove-rename-side-effect branch from 90e95a0 to 2cb4132 Compare December 8, 2023 16:09
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.

1 participant