-
Notifications
You must be signed in to change notification settings - Fork 71
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
watch doesn't update TS files when check: false
or within Vue files
#433
Comments
Created minimum reproduction repo |
check: false
or within Vue files
reproduction
For some context, the codebase has watch mode integration tests that pass successfully and similarly use the Rollup API. So a failing test case or minimum repro would be necessary as such, so thanks for updating with one. That is one of the reasons the issue template asks for a repro 😉 Vue integrationSo Vue SFCs are pretty convoluted and have some issues with them per #129. That and the fact that
|
This is a relatively complex issue to debug and fix, so I would suggest working around this ( |
@ezolenko can you test this with the provided repro before closing? Per my previous comment, given that this was happening with |
Unfortunately I was indeed able to reproduce this with Great repro with some logging to easily show if it's still broken or not! |
I came across the same problem and tried to understand the reason.
The issue is not with the Rollup cache but with the same DocumentRegistry between watch cycles. Here is a repository with hypothesis confirmation.
You can use the actual @vitejs/plugin-vue instead of the unmaintained rollup-plugin-vue. |
Vue plugin with Rollup typescript plugin only worked when rollup-plugin-typescript2 was used, but this plugin was broken in watch mode, where old code was cached and doesn't update, unless the watch mode was restarted: ezolenko/rollup-plugin-typescript2#433 (comment)
What happens and why it is incorrect
When running
rollup.watch
(programmatically) only the first build goes well. All the following builds result in the same output for .ts files. I've added a .js file and only that .js file gets changes on every re-build. None of the .ts files get an update after re-build.Same for .vue files. When using
<script setup lang="ts">
- it doesn't get updates after re-builds. When using<script setup>
- works fine. But I guess there is a single cause for both.Yes I pass
clean: true
option.Environment
WSL 2
Versions
rollup-plugin-typescript2 v0.34.1
:rollup.config.js
plugin output with verbosity 3
:The text was updated successfully, but these errors were encountered: