File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -266,7 +266,21 @@ pub fn watch(
266266 //
267267 // Fortunately (?) Tailwind's output only really tells is it rebuilt and
268268 // nothing else so there's no data we'd need to parse out anyway.
269- on_unknown : handle_change ,
269+ on_unknown : fn ( ) {
270+ // Check that the output file has actually been modified before resending assets
271+ let file_info = simplifile . file_info ( output <> ".css" )
272+ case file_info {
273+ Ok ( info ) -> {
274+ case info . mtime_seconds > info . atime_seconds {
275+ True -> handle_change ( )
276+ False -> Nil
277+ }
278+ }
279+ Error ( _e ) -> {
280+ cli . log ( "Failed to locate output css file" , quiet )
281+ }
282+ }
283+ } ,
270284 )
271285 |> result . replace_error ( error . CouldNotStartFileWatcher (
272286 watcher : path ,
You can’t perform that action at this time.
0 commit comments