Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/occar421/transmit-update-loader
Message passing tool to transmit update to another file during webpack loader process.
https://github.com/occar421/transmit-update-loader
communication css-modules loader transmit typescript watch webpack webpack-dev-server webpack-loader
Last synced: about 2 months ago
JSON representation
Message passing tool to transmit update to another file during webpack loader process.
- Host: GitHub
- URL: https://github.com/occar421/transmit-update-loader
- Owner: occar421
- License: mit
- Archived: true
- Created: 2018-03-03T04:22:14.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T23:04:52.000Z (almost 2 years ago)
- Last Synced: 2024-09-26T17:27:14.676Z (about 2 months ago)
- Topics: communication, css-modules, loader, transmit, typescript, watch, webpack, webpack-dev-server, webpack-loader
- Language: JavaScript
- Size: 1.98 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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]