egoist / egoist/tsup

Plugins `watchFiles` are ignored

Open
#801 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
11.3k
Forks
275
PR merge metrics
No merged PRs in 30d

Description

I use `esbuild-sass-plugin` to import SCSS and generate a CSS file. This plugin automatically resolve the SCSS `@import` instructions and return all additional files to watch in the `watchFiles` esbuild plugin output.

This works perfectly with an esbuild setup but not with tsup. For the later only a change to the main SCSS file triggers a rebuild. So it makes me think tsup somehow discards the `watchFiles` result, or just does not rely on esbuild watch mode ?

esbuild documentation for plugins https://esbuild.github.io/plugins/#on-resolve-results

demo repository (contains both esbuild and tsup config) https://github.com/mistic100/test-esbuild-sass

Contributor guide

Open the contributing guide

Research direction

Start by comparing the esbuild and tsup configurations in the linked demo repository, then read the esbuild plugin documentation for on-resolve results. Trace how the plugin's watchFiles output is handled during tsup watch mode; done means changes to additional SCSS imports trigger a rebuild, as they do with esbuild.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.