Feature Request: Ability to watch a copy task source and refresh www build when modified

Open
#2,809 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start by tracing how the copyTask runs during the www watch build and how Rollup watch files are handled. Investigate the reported addWatchFile behavior and define completion as copied asset sources triggering another copy and www rebuild without restarting the watch process.

Written by the indexing model from the issue text.

Description

Feature: Want this? Upvote it!

Stencil version:

 @stencil/core@<version>

I'm submitting a:

[ ] bug report
[x] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/

Current behavior:
Stencil does not currently watch copy task source files for change.

Expected behavior:
We are currently using the copyTask to copy compiled asset files during the www build. These asset files are compiled outside of the Stencil process.

However, as part of the development process, a dev could update one of the source asset file triggering a rebuild of the asset files product. Since the copyTask is only executed once, it would be great if it had an option for watching the filed copied and copy them over again in case they have been updated.

We tried to build a rollup plugin but Stencil is not honoring the addWatchFile.

We are currently stuck and the only solution is to stop and restart our watch build.

Dominant language
TypeScript
Stars
13.1k
Forks
855
Avg merge
4h 7m
Merged PRs (30d)
44

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from stenciljs/core

All issues in stenciljs/core

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.