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 files not yet created #126

Open
zachsa opened this issue Jul 12, 2022 · 2 comments
Open

Support watching files not yet created #126

zachsa opened this issue Jul 12, 2022 · 2 comments

Comments

@zachsa
Copy link
Collaborator

zachsa commented Jul 12, 2022

I get this error

thread 'main' panicked at 'Watching files not yet created is not yet supported, in depending on .ssr/index.js. This should be supported, please post an issue on GitHub!', src/task.rs:1335:29

In this case the .ssr/index.js file is created via a Rollup build, the task looks like this:

[[task]]
name = 'rollup:ssr'
deps = ['ssr/**/*.jsx']
run = 'rollup -c rollup/server.config.js'

Since rollup follows imports I run rollup once whenever a jsx file changes. But then in subsequent tasks I have to depend on the name of the task, not the output of the task (.ssr/index.js).

So far as I know... I can't specify to Rollup to just transform a single file to an output. I COULD do this with SWC, but then I don't have flexibility with file extensions

@guybedford
Copy link
Owner

Yes this is a TODO.

@zachsa
Copy link
Collaborator Author

zachsa commented Jul 15, 2022

Actually, this error has been helpful - it's helped me catch errors in my path defs. So I can definitely see that it could be useful, in that the output of one task might not exist, and is the input of another. But I think this should require an explicit flag. Just because in my experience if this was the default I would have not caught errors

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