# transmit-update-loader

> Message passing tool to transmit update to another file during webpack loader process.

Latest version **0.2.0** (published 2021-01-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install transmit-update-loader
pnpm add transmit-update-loader
yarn add transmit-update-loader
bun add transmit-update-loader
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2021-01-01 |
| First published | 2018-04-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 17.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | MasuqaT |
| Maintainers | occar421 |

## Links

- npm: https://www.npmjs.com/package/transmit-update-loader
- Repository: https://github.com/occar421/transmit-update-loader
- Homepage: https://github.com/occar421/transmit-update-loader#readme
- Issues: https://github.com/occar421/transmit-update-loader/issues
- npm.io page: https://npm.io/package/transmit-update-loader

## Dependencies (3)

- [touch](https://npm.io/package/touch.md) ^3.1.0
- [loader-utils](https://npm.io/package/loader-utils.md) ^2.0.0
- [schema-utils](https://npm.io/package/schema-utils.md) ^3.0.0

## Recent versions

- 0.2.0 (latest) — 2021-01-01
- 0.1.2 — 2018-04-01

## README

# transmit-update-loader

[![CircleCI](https://circleci.com/gh/occar421/transmit-update-loader/tree/master.svg?style=svg)](https://circleci.com/gh/occar421/transmit-update-loader/tree/master)
[![Build status](https://ci.appveyor.com/api/projects/status/slqhhh1kuiatmtaf/branch/master?svg=true)](https://ci.appveyor.com/project/occar421/transmit-update-loader/branch/master)
[![npm version](https://badge.fury.io/js/transmit-update-loader.svg)](https://badge.fury.io/js/transmit-update-loader)

Message passing tool to transmit an update to another file during webpack loader process.

# Use case

Assume this file structure while using CSS Modules.

```
+- src/
    +- Button.tsx
    +- Button.css
    +- Button.css.d.ts
```

Here, also assume we use Webpack Hot Module Replacement for dev server.  
When 'Button.css' is updated, 'Button.css.d.ts' could be updated.  
Although, 'Button.tsx' will not be notified that 'Button.css.d.ts' is updated.  
If 'Button.css' selector has changed, 'Button.tsx' won't be decorated correctly.

Fortunately, it seems that webpack detects update with watching the same event when it is `touch`-ed.

'Button.css' -(generate)-> 'Button.css.d.ts' -(watch)-(`touch`)-> 'Button.tsx' recompile.

# TODO

- Options
  - Throttle
  - [TBD]

---
_Source: https://npm.io/package/transmit-update-loader · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
